aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
diff options
context:
space:
mode:
authorGravatar buchgr <buchgr@google.com>2017-04-06 18:54:22 +0000
committerGravatar Marcel Hlopko <hlopko@google.com>2017-04-07 11:17:34 +0200
commit0b937434094c38333fad07ec603d269f5b750c30 (patch)
tree9864d657078fbd34b0d1a4e03deb8861dd2cd45a /src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
parented959e2a460e23cb253ce0c5c758e91e0f12e7bd (diff)
BEP: Improve the BuildEventTransport interface.
Better specify the BuildEventTransport interface. Besides clarifying threading and blocking issues, this change also clarifies error handling/reporting. After several discussions we concluded that the BuildEventTransport interface should not provide error reporting / handling facilities, as there is not much bazel could do with this information. Instead, a transport may decide for itself if an error is fatal and abort the build or if an error should be logged to the user's terminal or if it should be ignored. Furthermore, changing the close() method lays the groundwork for an upcoming change that will report the transport shutdown status to the user command line. PiperOrigin-RevId: 152408938
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
index 6d5dd01119..8c6483d66d 100644
--- a/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
+++ b/src/test/java/com/google/devtools/build/lib/runtime/BuildEventStreamerTest.java
@@ -18,6 +18,7 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import com.google.common.collect.ImmutableSet;
+import com.google.common.util.concurrent.Futures;
import com.google.devtools.build.lib.buildeventstream.BuildEvent;
import com.google.devtools.build.lib.buildeventstream.BuildEventConverters;
import com.google.devtools.build.lib.buildeventstream.BuildEventId;
@@ -31,6 +32,7 @@ import com.google.devtools.build.lib.buildtool.buildevent.BuildCompleteEvent;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
+import java.util.concurrent.Future;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
@@ -52,7 +54,9 @@ public class BuildEventStreamerTest {
}
@Override
- public void close() {}
+ public Future<Void> close() {
+ return Futures.immediateFuture(null);
+ }
List<BuildEvent> getEvents() {
return events;