Skip to content

Commit

Permalink
Fix test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddlet2666 committed Mar 8, 2024
1 parent 21a2ad8 commit 1bcb639
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions coherence/coherence_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ var testStore *Storage

func TestMain(m *testing.M) {
testStore, _ = New(Config{
Reset: true,
NearCacheTimeout: time.Duration(20) * time.Second,
Reset: true,
})

code := m.Run()
Expand Down Expand Up @@ -99,12 +98,11 @@ func Test_Coherence_Set_With_Expiry(t *testing.T) {
// set with an expiry of 5 seconds
err := testStore.Set(key1, value1, time.Duration(5)*time.Second)
require.NoError(t, err)
time.Sleep(time.Duration(6) * time.Second)
time.Sleep(time.Duration(10) * time.Second)

val, err = testStore.Get(key1)
require.NoError(t, err)
require.True(t, len(val) == 0)

}

func Test_Coherence_Get_Missing(t *testing.T) {
Expand Down

0 comments on commit 1bcb639

Please sign in to comment.