Skip to content

Commit

Permalink
Okx: Fix TestGetBlockTrade transient fail (thrasher-corp#1583)
Browse files Browse the repository at this point in the history
Last block trade has fallen outside 7 days many times now.
Switching to within 90 days, which appears safe.
  • Loading branch information
gbjk authored Jul 19, 2024
1 parent 4f1696f commit 34d9920
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exchanges/okx/okx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ func TestGetBlockTrade(t *testing.T) {
assert.Positive(t, trade.Price, "Price should have a positive value")
assert.Positive(t, trade.Size, "Size should have a positive value")
assert.Contains(t, []order.Side{order.Buy, order.Sell}, trade.Side, "Side should be a side")
assert.WithinRange(t, trade.Timestamp.Time(), time.Now().Add(time.Hour*-24*7), time.Now(), "Timestamp should be within last 7 days")
assert.WithinRange(t, trade.Timestamp.Time(), time.Now().Add(time.Hour*-24*90), time.Now(), "Timestamp should be within last 90 days")
}

testexch.UpdatePairsOnce(t, ok)
Expand Down

0 comments on commit 34d9920

Please sign in to comment.