Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
agouin committed Nov 20, 2023
1 parent 3dcbe26 commit 3bc9355
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions signer/cosigner_nonce_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,15 @@ func TestNonceCacheExpiration(t *testing.T) {

count, pruned := mp.Result()

// we should have pruned at least three times after
// waiting for a second with a reconcile interval of 250ms
require.GreaterOrEqual(t, count, 3)

// we should have pruned at least the number of nonces we loaded and knew would expire
require.GreaterOrEqual(t, pruned, loadN)

cancel()

// the cache should have at most the trim padding since no nonces are being consumed.
require.LessOrEqual(t, nonceCache.cache.Size(), targetTrim)
}

0 comments on commit 3bc9355

Please sign in to comment.