8000 fix race in TestReceiver by pongad · Pull Request #1558 · googleapis/google-cloud-java · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@pongad
8000 Copy link
Contributor
@pongad pongad commented Jan 23, 2017

cc @davidtorres

If TestReceiver is set so that messages must be explicitly acked,
test code acks a message by calling replyNextOutstandingMessage.
There is a race between calling the function and the message being
delivered.

Previously, if the function gets called before the message is delivered,
the test fails since polling an empty deque returns a null pointer.
This commit makes us wait until a message becomes available instead.

If TestReceiver is set so that messages must be explicitly acked,
test code acks a message by calling replyNextOutstandingMessage.
There is a race between calling the function and the message being
delivered.

Previously, if the function gets called before the message is delivered,
the test fails since polling an empty deque returns a null pointer.
This commit makes us wait until a message becomes available instead.
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jan 23, 2017
return;
}
replyTo(reply);
}

This comment was marked as spam.

This comment was marked as spam.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 2b8154d on pongad:sync-reply into ** on GoogleCloudPlatform:pubsub-hp**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 861a318 on pongad:sync-reply into ** on GoogleCloudPlatform:pubsub-hp**.

@pongad pongad merged commit c68968b into googleapis:pubsub-hp Jan 24, 2017
@pongad pongad deleted the sync-reply branch January 24, 2017 03:29
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6a1eb08 on pongad:sync-reply into ** on GoogleCloudPlatform:pubsub-hp**.

meltsufin pushed a commit that referenced this pull request Dec 22, 2025
…onfig to v1.7.5 (#1558)

* build(deps): update dependency com.google.cloud:google-cloud-shared-config to v1.7.5

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0