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

GoogleCloudPlatform / google-cloud-java / 2770
72%

Build:
DEFAULT BRANCH: master
Ran 07 Dec 2016 10:20AM UTC
Jobs 1
Files 387
Run time 31s
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
2770

Pull #1453

travis-ci

web-flow
pubsub: fix testStartStopReset

The test verifies that calling stop() actually stops the emulator.
The previous implementation stops the emulator by
- sending HTTP POST to /shutdown
- terminating the emulator process
The second step follows directly after the first.
It then queries the server it just shut down to make sure it does not
respond.

This behavior is incorrect for two reasons.
- The server might continue serving request after responding to
  /shutdown.
- The "emulator process" might not be the emulator at all.
  It might be a script that in-turn runs the emulator.
  On UNIX systems, killing a parent process does not kill any of its
  children; the actual emulator might run indefinitely after
  we kill the process we spawned.

This commit changes this behavior.
After POSTing to /shutdown, we simply wait for the spawned process
to terminate on its own.

Technically, there is still a race:
Another emulator could have been started on the same port.
When we send a request to verify that the old emulator has terminated,
we might get a response from the new one.
Since we execute tests sequentially though,
I believe this should not be a problem in practice.

Updates #1429.
Pull Request #1453: pubsub: fix testStartStopReset

11 of 11 new or added lines in 3 files covered. (100.0%)

16856 of 20182 relevant lines covered (83.52%)

122.04 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
7
100.0
google-cloud-core/src/main/java/com/google/cloud/testing/BaseEmulatorHelper.java

Uncovered Existing Lines

Lines Coverage ∆ File
4
100.0
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/testing/LocalPubSubHelper.java
11
100.0
google-cloud-datastore/src/main/java/com/google/cloud/datastore/testing/LocalDatastoreHelper.java
75
100.0
google-cloud-core/src/main/java/com/google/cloud/testing/BaseEmulatorHelper.java
Jobs
ID Job ID Ran Files Coverage
2 2770.2 07 Dec 2016 10:20AM UTC 0
83.52
Travis Job 2770.2
Source Files on build 2770
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2770
  • Pull Request #1453
  • PR Base - master (#2765)
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