Skip to content

Commit

Permalink
Refactor mock leader in nonce cache tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nitronit committed Dec 19, 2023
1 parent 95a1cba commit 731103a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions signer/cosigner_nonce_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func TestNonceCacheDemand(t *testing.T) {
nonceCache := NewCosignerNonceCache(
cometlog.NewTMLogger(cometlog.NewSyncWriter(os.Stdout)),
cosigners,
&MockLeader{id: 1, leader: &ThresholdValidator{myCosigner: lcs[0]}},
&MockLeader{id: 1, leader: &MockThresholdValidator{myCosigner: lcs[0]}},
500*time.Millisecond,
100*time.Millisecond,
defaultNonceExpiration,
Expand Down Expand Up @@ -205,7 +205,7 @@ func TestNonceCacheExpiration(t *testing.T) {
nonceCache := NewCosignerNonceCache(
cometlog.NewTMLogger(cometlog.NewSyncWriter(os.Stdout)),
cosigners,
&MockLeader{id: 1, leader: &ThresholdValidator{myCosigner: lcs[0]}},
&MockLeader{id: 1, leader: &MockThresholdValidator{myCosigner: lcs[0]}},
getNoncesInterval,
getNoncesTimeout,
noncesExpiration,
Expand Down Expand Up @@ -411,7 +411,7 @@ func TestNonceCacheDemandSlow(t *testing.T) {
nonceCache := NewCosignerNonceCache(
cometlog.NewTMLogger(cometlog.NewSyncWriter(os.Stdout)),
cosigners,
&MockLeader{id: 1, leader: &ThresholdValidator{myCosigner: lcs[0]}},
&MockLeader{id: 1, leader: &MockThresholdValidator{myCosigner: lcs[0]}},
90*time.Millisecond,
100*time.Millisecond,
500*time.Millisecond,
Expand Down Expand Up @@ -448,7 +448,7 @@ func TestNonceCacheDemandSlowDefault(t *testing.T) {
nonceCache := NewCosignerNonceCache(
cometlog.NewTMLogger(cometlog.NewSyncWriter(os.Stdout)),
cosigners,
&MockLeader{id: 1, leader: &ThresholdValidator{myCosigner: lcs[0]}},
&MockLeader{id: 1, leader: &MockThresholdValidator{myCosigner: lcs[0]}},
defaultGetNoncesInterval,
defaultGetNoncesTimeout,
defaultNonceExpiration,
Expand Down
2 changes: 1 addition & 1 deletion signer/threshold_validator_test.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package signer_test
package signer

import (
"bytes"
Expand Down

0 comments on commit 731103a

Please sign in to comment.