@@ -110,9 +110,8 @@ public void testExecInWorker_happyPath() throws ExecException, InterruptedExcept
110
110
WorkerKey key = createWorkerKey (fs , "mnem" , false );
111
111
Path logFile = fs .getPath ("/worker.log" );
112
112
when (worker .getLogFile ()).thenReturn (logFile );
113
- when (worker .getResponse (1 ))
114
- .thenReturn (
115
- WorkResponse .newBuilder ().setExitCode (0 ).setOutput ("out" ).setRequestId (1 ).build ());
113
+ when (worker .getResponse (0 ))
114
+ .thenReturn (WorkResponse .newBuilder ().setExitCode (0 ).setOutput ("out" ).build ());
116
115
WorkResponse response =
117
116
runner .execInWorker (
118
117
spawn ,
@@ -126,7 +125,7 @@ public void testExecInWorker_happyPath() throws ExecException, InterruptedExcept
126
125
127
126
assertThat (response ).isNotNull ();
128
127
assertThat (response .getExitCode ()).isEqualTo (0 );
129
- assertThat (response .getRequestId ()).isEqualTo (1 );
128
+ assertThat (response .getRequestId ()).isEqualTo (0 );
130
129
assertThat (response .getOutput ()).isEqualTo ("out" );
131
130
assertThat (logFile .exists ()).isFalse ();
132
131
}
@@ -149,7 +148,7 @@ private void assertRecordedResponsethrowsException(String recordedResponse, Stri
149
148
WorkerKey key = createWorkerKey (fs , "mnem" , false );
150
149
Path logFile = fs .getPath ("/worker.log" );
151
150
when (worker .getLogFile ()).thenReturn (logFile );
152
- when (worker .getResponse (1 )).thenThrow (new IOException ("Bad protobuf" ));
151
+ when (worker .getResponse (0 )).thenThrow (new IOException ("Bad protobuf" ));
153
152
when (worker .getRecordingStreamMessage ()).thenReturn (recordedResponse );
154
153
String workerLog = "Log from worker\n " ;
155
154
FileSystemUtils .writeIsoLatin1 (logFile , workerLog );
0 commit comments