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

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

Build:
Build:
LAST BUILD BRANCH: resource-manager
DEFAULT BRANCH: master
Ran 25 Jan 2017 10:52PM UTC
Jobs 1
Files 379
Run time 21s
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
2990

push

travis-ci

web-flow
fix race in mock publisher (#1560)

* 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,
and use a fake "random" number generator to ensure we don't
run out of return values.

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.

8 of 8 new or added lines in 1 file covered. (100.0%)

16784 of 20202 relevant lines covered (83.08%)

161.21 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
100.0
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/Publisher.java

Uncovered Existing Lines

Lines Coverage ∆ File
45
100.0
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/Subscriber.java
Jobs
ID Job ID Ran Files Coverage
2 2990.2 25 Jan 2017 10:52PM UTC 0
83.08
Travis Job 2990.2
Source Files on build 2990
  • Tree
  • List 0
  • Changed 9
  • Source Changed 2
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Travis Build #2990
  • 10bedac8 on github
  • Prev Build on pubsub-hp (#2983)
  • Next Build on pubsub-hp (#2994)
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

© 2025 Coveralls, Inc