Skip to content
New issue

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

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

Already on GitHub? # to your account

deflake SubscriberImplTest, maybe #1495

Merged
merged 1 commit into from
Dec 22, 2016
Merged

deflake SubscriberImplTest, maybe #1495

merged 1 commit into from
Dec 22, 2016

Conversation

pongad
Copy link
Contributor

@pongad pongad commented Dec 22, 2016

This commit tries to deflake failures reported in https://ci.appveyor.com/project/garrettjonesgoogle/google-cloud-java/build/57 .

The failure seems to come from FakeSubscriberServiceImpl::sendError. When calling getAndAdvanceCurrentStream, we waited for there to be a subscription by waiting on the subscriptionInitialized variable.

The variable is notified before addOpenedStream is called though, and so it's possible that getAndAdvanceCurrentStream will see a list without any opened stream. The fix is to wait for at least one stream to be registered first.

@davidtorres Another option seems to be moving addOpenedStream into the synchronized block. I'm not sure which is the better option.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Dec 22, 2016
@pongad pongad merged commit c206efe into googleapis:pubsub-hp Dec 22, 2016
@pongad pongad deleted the deflake-div0 branch December 22, 2016 03:02
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6af9b99 on pongad:deflake-div0 into ** on GoogleCloudPlatform:pubsub-hp**.

pongad added a commit that referenced this pull request Feb 7, 2017
This is the same race as
#1495
but in sendStreamResponse rather than sendError.
# for free to join this conversation on GitHub. Already have an account? # 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.

4 participants