Fix flaky tests

Some tests were failing due to mismatch in Score in ZSetEntry.
Changed ZSetEntry Score to float64 type so that we can use
cmpopts.EquateApprox to allow for margin when comparing.
This commit is contained in:
Ken Hibino
2020-01-11 10:02:13 -08:00
parent 2631672575
commit 97316d6766
6 changed files with 152 additions and 150 deletions

View File

@@ -58,7 +58,7 @@ func TestClient(t *testing.T) {
Retry: defaultMaxRetry,
Queue: "default",
},
Score: time.Now().Add(2 * time.Hour).Unix(),
Score: float64(time.Now().Add(2 * time.Hour).Unix()),
},
},
},