1
0
mirror of https://github.com/redis/go-redis.git synced 2025-12-02 06:22:31 +03:00

fix assertion

This commit is contained in:
Nedyalko Dyakov
2025-10-29 16:11:27 +02:00
parent 7201275eb5
commit 62eecaa75e

View File

@@ -90,8 +90,9 @@ func TestConn_UsedAtUpdatedOnWrite(t *testing.T) {
// Verify the difference is reasonable (should be around 100ms, accounting for ~50ms cache precision) // Verify the difference is reasonable (should be around 100ms, accounting for ~50ms cache precision)
diff := updatedUsedAt.Sub(initialUsedAt) diff := updatedUsedAt.Sub(initialUsedAt)
if diff < 50*time.Millisecond || diff > 200*time.Millisecond {
t.Errorf("Expected usedAt difference to be around 100ms (±50ms for cache), got %v", diff) if diff > 100*time.Millisecond {
t.Errorf("Expected usedAt difference to be no more than 100ms (±50ms for cache), got %v", diff)
} }
} }