Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Nov 20, 2023
1 parent edb0723 commit 835d3c8
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions signer/cosigner_nonce_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/stretchr/testify/require"
)

func TestNonceCache(t *testing.T) {
func TestNonceCache(_ *testing.T) {
nc := NonceCache{}
for i := 0; i < 10; i++ {
nc.Add(&CachedNonce{UUID: uuid.New(), Expiration: time.Now().Add(1 * time.Second)})
Expand Down Expand Up @@ -59,7 +59,7 @@ func TestNonceCacheDemand(t *testing.T) {
&MockLeader{id: 1, leader: &ThresholdValidator{myCosigner: lcs[0]}},
500*time.Millisecond,
100*time.Millisecond,
5*time.Second,
defaultNonceExpiration,
2,
mp,
)
Expand Down Expand Up @@ -119,11 +119,11 @@ func TestNonceCacheExpiration(t *testing.T) {

go nonceCache.Start(ctx)

time.Sleep(500 * time.Millisecond)
time.Sleep(520 * time.Millisecond)

nonceCache.LoadN(ctx, 500)

time.Sleep(500 * time.Millisecond)
time.Sleep(520 * time.Millisecond)

size := nonceCache.cache.Size()

Expand All @@ -134,7 +134,7 @@ func TestNonceCacheExpiration(t *testing.T) {
require.Equal(t, count, 6)
require.Equal(t, 500, pruned)

time.Sleep(500 * time.Millisecond)
time.Sleep(520 * time.Millisecond)

count, pruned = mp.Result()

Expand Down

0 comments on commit 835d3c8

Please sign in to comment.