Skip to content

Commit b4b6bdb

Browse files
neilalexanderwallyqs
authored andcommitted
Fix race in TestJetStreamClusterGhostEphemeralsAfterRestart
Signed-off-by: Neil Twigg <neil@nats.io>
1 parent 32578bf commit b4b6bdb

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/jetstream_cluster_3_test.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -1600,10 +1600,12 @@ func TestJetStreamClusterParallelConsumerCreation(t *testing.T) {
16001600
}
16011601

16021602
func TestJetStreamClusterGhostEphemeralsAfterRestart(t *testing.T) {
1603-
consumerNotActiveStartInterval = time.Second * 5
1604-
defer func() {
1603+
consumerNotActiveStartInterval = time.Second
1604+
consumerNotActiveMaxInterval = time.Second
1605+
t.Cleanup(func() {
16051606
consumerNotActiveStartInterval = defaultConsumerNotActiveStartInterval
1606-
}()
1607+
consumerNotActiveMaxInterval = defaultConsumerNotActiveMaxInterval
1608+
})
16071609

16081610
c := createJetStreamClusterExplicit(t, "R3S", 3)
16091611
defer c.shutdown()

0 commit comments

Comments
 (0)