• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

GoogleCloudPlatform / google-cloud-java / 2985
83%
master: 72%

Build:
Build:
LAST BUILD BRANCH: resource-manager
DEFAULT BRANCH: master
Ran 24 Jan 2017 06:35AM UTC
Jobs 1
Files 379
Run time 19s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
2985

Pull #1560

travis-ci

web-flow
fix race in mock publisher

FakePublisherServiceImpl::publish has a race.
If the call to publish happen before a response can be placed,
the server will try to respond with a null object.

The fix is to either
- always set the response before calling
- make publish wait for the response
For propriety, this commit does both.

This fix reveals another flake.
Publisher uses exponential backoff with jitter.
The jitter randomly picks a number between 0 and a maximum.
If we pick low values too many times,
it will retry too often and the server will run out of canned
transient errors to respond back with.
The test still passed since it expected any Throwable.

This commit fixed the test to expect FakeException,
set the jitter to random in range (max/2, max),
and increases the number of canned errors to compensate.

Retrying can still causes random test failures,
independently of above changes.
If a request fails due to DEADLINE_EXCEEDED,
the future is completed with a corresponding error.
However, the last RPC might not have been successfully cancelled.
When a new test starts, it gives canned response to the server.
The server might use some of these responses to respond to
RPCs of previous tests.
Consequently, a misbehaving test can fail every test that comes
after it.
This commit changes the test setup code so that it
creates a new fake server for every test to avoid this problem.
Pull Request #1560: fix race in mock publisher

16756 of 20142 relevant lines covered (83.19%)

161.65 hits per line

Jobs
ID Job ID Ran Files Coverage
2 2985.2 24 Jan 2017 06:35AM UTC 0
83.19
Travis Job 2985.2
Source Files on build 2985
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2985
  • Pull Request #1560
  • PR Base - pubsub-hp (#2983)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc