mirror of https://github.com/hashicorp/consul
agent: resolve flaky test by checking cache hits increase, rather than
exactpull/4275/head
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
|
// Should be a cache hit! The data should've updated in the cache
|
||||||
// in the background so this should've been fetched directly from
|
// in the background so this should've been fetched directly from
|
||||||
// the cache.
|
// the cache.
|
||||||
require.Equal(cacheHits+1, a.cache.Hits())
|
if v := a.cache.Hits(); v < cacheHits+1 {
|
||||||
cacheHits++
|
t.Fatalf("expected at least one more cache hit, still at %d", v)
|
||||||
|
}
|
||||||
|
cacheHits = a.cache.Hits()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue