Skip to content

Commit

Permalink
Fix TestMessageCache.
Browse files Browse the repository at this point in the history
  • Loading branch information
arijitAD committed May 19, 2021
1 parent 1ad4224 commit 3cd1599
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions dot/network/message_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ import (
)

func TestMessageCache(t *testing.T) {
// TODO: Cache has issues with timeout. https://discuss.dgraph.io/t/setwithttl-doesnt-work/14192
t.Skip("")
cacheSize := 64 << 20 // 64 MB
msgCache, err := newMessageCache(ristretto.Config{
NumCounters: int64(float64(cacheSize) * 0.05 * 2),
Expand Down Expand Up @@ -44,7 +42,8 @@ func TestMessageCache(t *testing.T) {
ok = msgCache.exists(peerID, msg)
require.True(t, ok)

time.Sleep(50 * time.Millisecond)
// TODO: Cache has issues with timeout. https://discuss.dgraph.io/t/setwithttl-doesnt-work/14192
time.Sleep(3 * time.Second)

ok = msgCache.exists(peerID, msg)
require.False(t, ok)
Expand Down

0 comments on commit 3cd1599

Please sign in to comment.