Skip to content

Commit

Permalink
Update tests to use AckWait instead
Browse files Browse the repository at this point in the history
  • Loading branch information
nsurfer committed Feb 25, 2021
1 parent 25ab2b8 commit 1c9b756
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/js_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func TestJetStreamPublish(t *testing.T) {
ctx, cancel := context.WithTimeout(context.Background(), time.Second)
defer cancel()

_, err = js.Publish("foo", msg, nats.MaxWait(time.Second), nats.Context(ctx))
_, err = js.Publish("foo", msg, nats.AckWait(time.Second), nats.Context(ctx))
if err != nats.ErrContextAndTimeout {
t.Fatalf("Expected %q, got %q", nats.ErrContextAndTimeout, err)
}
Expand All @@ -220,7 +220,7 @@ func TestJetStreamPublish(t *testing.T) {
sub, _ := nc.SubscribeSync("baz")
defer sub.Unsubscribe()

_, err = js.Publish("baz", msg, nats.MaxWait(time.Nanosecond))
_, err = js.Publish("baz", msg, nats.AckWait(time.Nanosecond))
if err != nats.ErrTimeout {
t.Fatalf("Expected %q, got %q", nats.ErrTimeout, err)
}
Expand Down Expand Up @@ -1776,7 +1776,7 @@ func TestJetStreamSubscribe_AckPolicy(t *testing.T) {
t.Errorf("Unexpected error: %v", err)
}

err = msg.AckSync(nats.MaxWait(2 * time.Second))
err = msg.AckSync(nats.AckWait(2 * time.Second))
if err != nats.ErrInvalidJSAck {
t.Errorf("Unexpected error: %v", err)
}
Expand Down

0 comments on commit 1c9b756

Please sign in to comment.