fixed unit tests where SequencePair comparisons fail due to last_active #2446
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When testing client changes nats-io/nats.go#794
I noticed these tests fail. Typically one time in a comparison was last.
This makes the error go away, but I'm not sure if setting Last to nil is the right thing to do.
Only merge after the client library got updated in the server.
Signed-off-by: Matthias Hanel mh@synadia.com
=== RUN TestJetStreamClusterConsumerState
jetstream_cluster_test.go:625: Consumer delivered did not match after leader switch, wanted {Consumer:5 Stream:5 Last:2021-08-17 00:23:42.944572 +0000 UTC}, got {Consumer:5 Stream:5 Last:2021-08-17 00:23:42.945467 +0000 UTC}
--- FAIL: TestJetStreamClusterConsumerState (1.82s)
=== RUN TestJetStreamClusterStreamPublishWithActiveConsumers
jetstream_cluster_test.go:1052: Consumer info did not match: &{Stream:foo Name:dlc Created:2021-08-17 00:23:55.560387 +0000 UTC Config:{Durable:dlc DeliverSubject:_INBOX.PMVrox5lIISQNjxPY2pXAV DeliverGroup: DeliverPolicy:0 OptStartSeq:0 OptStartTime: AckPolicy:AckExplicit AckWait:30s MaxDeliver:-1 FilterSubject:foo ReplayPolicy:0 RateLimit:0 SampleFrequency: MaxWaiting:0 MaxAckPending:65536 FlowControl:false Heartbeat:0s} Delivered:{Consumer:11 Stream:11 Last:2021-08-17 00:23:56.009337 +0000 UTC} AckFloor:{Consumer:1 Stream:1 Last:2021-08-17 00:23:55.997206 +0000 UTC} NumAckPending:10 NumRedelivered:0 NumWaiting:0 NumPending:0 Cluster: PushBound:true} vs &{Stream:foo Name:dlc Created:2021-08-17 00:23:55.560387 +0000 UTC Config:{Durable:dlc DeliverSubject:_INBOX.PMVrox5lIISQNjxPY2pXAV DeliverGroup: DeliverPolicy:0 OptStartSeq:0 OptStartTime: AckPolicy:AckExplicit AckWait:30s MaxDeliver:-1 FilterSubject:foo ReplayPolicy:0 RateLimit:0 SampleFrequency: MaxWaiting:0 MaxAckPending:65536 FlowControl:false Heartbeat:0s} Delivered:{Consumer:11 Stream:11 Last:2021-08-17 00:23:56.00995 +0000 UTC} AckFloor:{Consumer:1 Stream:1 Last:2021-08-17 00:23:55.997597 +0000 UTC} NumAckPending:10 NumRedelivered:0 NumWaiting:0 NumPending:0 Cluster: PushBound:true}
--- FAIL: TestJetStreamClusterStreamPublishWithActiveConsumers (1.55s)
=== RUN TestJetStreamClusterUserSnapshotAndRestore
jetstream_cluster_test.go:2699: Delivered states do not match {Consumer:100 Stream:100 Last:} vs {Consumer:100 Stream:100 Last:2021-08-17 00:24:30.332541 +0000 UTC}
--- FAIL: TestJetStreamClusterUserSnapshotAndRestore (2.47s)
=== RUN TestJetStreamServerEncryption
jetstream_test.go:12063: Consumer infos did not match
&{Stream:TEST Name:dlc Created:2021-08-16 20:28:12.441086 -0400 EDT m=+335.874847871 Config:{Durable:dlc DeliverSubject: DeliverGroup: DeliverPolicy:0 OptStartSeq:0 OptStartTime: AckPolicy:AckExplicit AckWait:30s MaxDeliver:-1 FilterSubject:foo ReplayPolicy:0 RateLimit:0 SampleFrequency: MaxWaiting:512 MaxAckPending:65536 FlowControl:false Heartbeat:0s} Delivered:{Consumer:10 Stream:10 Last:2021-08-17 00:28:12.392064 +0000 UTC} AckFloor:{Consumer:5 Stream:5 Last:2021-08-17 00:28:12.39246 +0000 UTC} NumAckPending:5 NumRedelivered:0 NumWaiting:0 NumPending:0 Cluster: PushBound:false}
vs
&{Stream:TEST Name:dlc Created:2021-08-16 20:28:12.441086 -0400 EDT m=+335.874847871 Config:{Durable:dlc DeliverSubject: DeliverGroup: DeliverPolicy:0 OptStartSeq:0 OptStartTime: AckPolicy:AckExplicit AckWait:30s MaxDeliver:-1 FilterSubject:foo ReplayPolicy:0 RateLimit:0 SampleFrequency: MaxWaiting:512 MaxAckPending:65536 FlowControl:false Heartbeat:0s} Delivered:{Consumer:10 Stream:10 Last:} AckFloor:{Consumer:5 Stream:5 Last:} NumAckPending:5 NumRedelivered:0 NumWaiting:0 NumPending:0 Cluster: PushBound:false}
--- FAIL: TestJetStreamServerEncryption (0.10s)