store/cockroach: fix dropped test errors (#1419)
Co-authored-by: Asim Aslam <asim@aslam.me>
This commit is contained in:
parent
6723d17b22
commit
011a783a9e
@ -108,11 +108,17 @@ func TestSQL(t *testing.T) {
|
||||
sqlStore.Write(&store.Record{Key: "aaaa", Value: []byte("bbb"), Expiry: 5 * time.Second})
|
||||
sqlStore.Write(&store.Record{Key: "aaaaa", Value: []byte("bbb"), Expiry: 5 * time.Second})
|
||||
results, err := sqlStore.Read("a", store.ReadPrefix())
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if len(results) != 3 {
|
||||
t.Fatal("Results should have returned 3 records")
|
||||
}
|
||||
time.Sleep(6 * time.Second)
|
||||
results, err = sqlStore.Read("a", store.ReadPrefix())
|
||||
if err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
if len(results) != 0 {
|
||||
t.Fatal("Results should have returned 0 records")
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user