aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java')
-rw-r--r--src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java b/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java
index e241e8410c..62ac3da28b 100644
--- a/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java
+++ b/src/test/java/com/google/devtools/build/lib/buildeventstream/transports/BinaryFormatFileTransportTest.java
@@ -22,6 +22,7 @@ import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos;
import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.BuildStarted;
import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.Progress;
import com.google.devtools.build.lib.buildeventstream.BuildEventStreamProtos.TargetComplete;
+import com.google.devtools.build.lib.buildeventstream.PathConverter;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
@@ -45,6 +46,8 @@ public class BinaryFormatFileTransportTest {
@Mock public BuildEvent buildEvent;
+ @Mock public PathConverter pathConverter;
+
@Before
public void initMocks() {
MockitoAnnotations.initMocks(this);
@@ -63,20 +66,21 @@ public class BinaryFormatFileTransportTest {
BuildEventStreamProtos.BuildEvent.newBuilder()
.setStarted(BuildStarted.newBuilder().setCommand("build"))
.build();
- when(buildEvent.asStreamProto()).thenReturn(started);
- BinaryFormatFileTransport transport = new BinaryFormatFileTransport(output.getAbsolutePath());
+ when(buildEvent.asStreamProto(pathConverter)).thenReturn(started);
+ BinaryFormatFileTransport transport =
+ new BinaryFormatFileTransport(output.getAbsolutePath(), pathConverter);
transport.sendBuildEvent(buildEvent);
BuildEventStreamProtos.BuildEvent progress =
BuildEventStreamProtos.BuildEvent.newBuilder().setProgress(Progress.newBuilder()).build();
- when(buildEvent.asStreamProto()).thenReturn(progress);
+ when(buildEvent.asStreamProto(pathConverter)).thenReturn(progress);
transport.sendBuildEvent(buildEvent);
BuildEventStreamProtos.BuildEvent completed =
BuildEventStreamProtos.BuildEvent.newBuilder()
.setCompleted(TargetComplete.newBuilder().setSuccess(true))
.build();
- when(buildEvent.asStreamProto()).thenReturn(completed);
+ when(buildEvent.asStreamProto(pathConverter)).thenReturn(completed);
transport.sendBuildEvent(buildEvent);
transport.close();