diff options
author | 2017-09-29 08:46:10 -0400 | |
---|---|---|
committer | 2017-09-29 12:14:50 -0400 | |
commit | 3dc2f544d8362091ed33c1c486d64d201e65ee7e (patch) | |
tree | 43b9e0aece7c953d247fdf91833a5d3d8951e2a8 /src | |
parent | 65959f53f74a8d0b7cba4a2adc7ed2bdfa1ea0ff (diff) |
Fix flakiness of BuildEventServiceTests
The flakiness was caused by waiting for the server to receive the second
life-cycle event, but not waiting for the ack to get to the client. In that
case, the interruption would happen before the life-cycle call returned, in
which case it threw the InterruptedException, and then the stream doesn't
exist yet, and so there's no mechanism to send anything to the server.
PiperOrigin-RevId: 170472383
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java index be2ee4d66f..8c79989c99 100644 --- a/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java +++ b/src/main/java/com/google/devtools/build/lib/buildeventservice/BuildEventServiceTransport.java @@ -174,6 +174,10 @@ public class BuildEventServiceTransport implements BuildEventTransport { this.sleeper = sleeper; } + public boolean isStreaming() { + return besClient.isStreamActive(); + } + @Override public ListenableFuture<Void> close() { return close(/*now=*/false); |