Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(pubsub): remove duplicate ctx assignment in ordered keys test #9476

Merged
merged 2 commits into from Feb 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions pubsub/integration_test.go
Expand Up @@ -1177,7 +1177,7 @@ func TestIntegration_OrderedKeys_Basic(t *testing.T) {
}

received := make(chan string, numItems)
ctx, cancel := context.WithCancel(ctx)
ctx2, cancel := context.WithCancel(ctx)
go func() {
for i := 0; i < numItems; i++ {
select {
Expand All @@ -1193,7 +1193,7 @@ func TestIntegration_OrderedKeys_Basic(t *testing.T) {
cancel()
}()

if err := sub.Receive(ctx, func(ctx context.Context, msg *Message) {
if err := sub.Receive(ctx2, func(ctx context.Context, msg *Message) {
defer msg.Ack()
if msg.OrderingKey != orderingKey {
t.Errorf("got ordering key %s, expected %s", msg.OrderingKey, orderingKey)
Expand Down Expand Up @@ -1502,7 +1502,7 @@ func TestIntegration_OrderingWithExactlyOnce(t *testing.T) {
}

received := make(chan string, numItems)
ctx, cancel := context.WithCancel(ctx)
ctx2, cancel := context.WithCancel(ctx)
go func() {
for i := 0; i < numItems; i++ {
select {
Expand All @@ -1518,7 +1518,7 @@ func TestIntegration_OrderingWithExactlyOnce(t *testing.T) {
cancel()
}()

if err := sub.Receive(ctx, func(ctx context.Context, msg *Message) {
if err := sub.Receive(ctx2, func(ctx context.Context, msg *Message) {
defer msg.Ack()
if msg.OrderingKey != orderingKey {
t.Errorf("got ordering key %s, expected %s", msg.OrderingKey, orderingKey)
Expand Down