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

GoogleCloudPlatform / google-cloud-java / 2785
72%

Build:
DEFAULT BRANCH: master
Ran 08 Dec 2016 10:48AM UTC
Jobs 1
Files 390
Run time 20s
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
2785

Pull #1457

travis-ci

web-flow
simplify BlockingProcessStreamReader; fix tests

Update #1429.

This commit simplifies the main run() method.
Previous implementation checks whether the underlying Reader is ready to read
then either reads a line or sleeps,
catching InterruptedException to watch for any thread interruption.

There are subtle difficulties with this approach:
- Even if the underlying Reader is ready to read, it might not have
  enough bytes to form a line. It might still block.
- It's not necessary to sleep. If the thread is interrupted while
  reading. It should throw InterruptedIOException.
The method now reads in a loop, waiting for either exceptions or EOF.

The test class implements a mock Logger that logs to a data structure.
It then verifies that the data structure holds appropriate logs.
As implemented, this can cause a race, as two threads,
the writer and the verifier, run concurrently.
This commit fixes this by waiting for the writing thread to terminate
before verifying.
Pull Request #1457: simplify BlockingProcessStreamReader; fix tests

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

17023 of 20368 relevant lines covered (83.58%)

121.25 hits per line

New Missed Lines in Diff

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

Uncovered Existing Lines

Lines Coverage ∆ File
1
100.0
google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/MessageConsumerImpl.java
1
100.0
google-cloud-core/src/main/java/com/google/cloud/testing/BlockingProcessStreamReader.java
Jobs
ID Job ID Ran Files Coverage
2 2785.2 08 Dec 2016 10:48AM UTC 0
83.58
Travis Job 2785.2
Source Files on build 2785
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #2785
  • Pull Request #1457
  • PR Base - master (#2783)
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