Skip to content

Commit

Permalink
Changes to Pubsub Test for ExactlyOnce (#269)
Browse files Browse the repository at this point in the history
* fix: bad feature check for ExactlyOnce

* fix: skip TestMessageCtx when ExactlyOnceDelivery is being tested

* when testing with NATS jetstream the broker will not allow message
  republication with the same message ID

* fix: skip TestContinueAfterSubscribeClose if not persistent
  • Loading branch information
AlexCuse authored Mar 17, 2022
1 parent 019cc05 commit 28527d6
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pubsub/tests/test_pubsub.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ func TestContinueAfterSubscribeClose(
createPubSub PubSubConstructor,
) {
if !tCtx.Features.Persistent {
t.Skip("Non-Persistent is not supported yet")
}

if tCtx.Features.ExactlyOnceDelivery {
t.Skip("ExactlyOnceDelivery test is not supported yet")
}

Expand Down Expand Up @@ -886,6 +890,13 @@ func TestMessageCtx(
tCtx TestContext,
pubSubConstructor PubSubConstructor,
) {
if tCtx.Features.ExactlyOnceDelivery {
// with ExactlyOnce delivery (at least as implemented by NATS jetstream)
// the second message will never be received because the broker deduplicates
// by message ID.
t.Skip("ExactlyOnceDelivery test is not supported yet")
}

pub, sub := pubSubConstructor(t)
defer closePubSub(t, pub, sub)

Expand Down

0 comments on commit 28527d6

Please sign in to comment.