mirror of https://github.com/status-im/consul.git
agent: resolve flaky test by checking cache hits increase, rather than
exact
This commit is contained in:
parent
051f004683
commit
8c1d5a2cdc
|
@ -2194,8 +2194,10 @@ func TestAgentConnectCARoots_list(t *testing.T) {
|
|||
// Should be a cache hit! The data should've updated in the cache
|
||||
// in the background so this should've been fetched directly from
|
||||
// the cache.
|
||||
require.Equal(cacheHits+1, a.cache.Hits())
|
||||
cacheHits++
|
||||
if v := a.cache.Hits(); v < cacheHits+1 {
|
||||
t.Fatalf("expected at least one more cache hit, still at %d", v)
|
||||
}
|
||||
cacheHits = a.cache.Hits()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue