Skip to content

Commit 693b307

Browse files
Copilotbootjp
andcommitted
fix: use deterministic fake clock in TestShadowPubSub_DuplicateSecondaryBuffered
Co-authored-by: bootjp <1306365+bootjp@users.noreply.github.com>
1 parent 2787117 commit 693b307

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

proxy/shadow_pubsub_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,8 @@ func TestShadowPubSub_CompareLoopExitsOnChannelClose(t *testing.T) {
168168
}
169169

170170
func TestShadowPubSub_DuplicateSecondaryBuffered(t *testing.T) {
171-
sp := newTestShadowPubSub(10 * time.Millisecond)
171+
clock := newTestClock()
172+
sp := newTestShadowPubSubWithClock(1*time.Second, clock.Now)
172173

173174
// Two identical secondary messages arrive before any primary.
174175
sp.matchSecondary(&redis.Message{Channel: "ch1", Payload: "dup"})

0 commit comments

Comments
 (0)