From 011a783a9e30bcf0fd6ac754b728b4690d9a2233 Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Fri, 27 Mar 2020 03:15:37 -0700 Subject: [PATCH] store/cockroach: fix dropped test errors (#1419) Co-authored-by: Asim Aslam --- store/cockroach/cockroach_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/store/cockroach/cockroach_test.go b/store/cockroach/cockroach_test.go index d9a95c1b..304078c8 100644 --- a/store/cockroach/cockroach_test.go +++ b/store/cockroach/cockroach_test.go @@ -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") }