@@ -118,12 +118,12 @@ public void testPutRequest_json_success() throws IOException, InterruptedExcepti
118
118
testWorker .putRequest (WorkRequest .getDefaultInstance ());
119
119
120
120
OutputStream stdout = testWorker .getFakeSubprocess ().getOutputStream ();
121
- assertThat (stdout .toString ()).isEqualTo ("{}" );
121
+ assertThat (stdout .toString ()).isEqualTo ("{}" + System . lineSeparator () );
122
122
}
123
123
124
124
@ Test
125
125
public void testGetResponse_json_success () throws IOException , InterruptedException {
126
- TestWorker testWorker = createTestWorker ("{}" .getBytes (UTF_8 ), JSON );
126
+ TestWorker testWorker = createTestWorker (( "{}" + System . lineSeparator ()) .getBytes (UTF_8 ), JSON );
127
127
WorkResponse readResponse = testWorker .getResponse (0 );
128
128
WorkResponse response = WorkResponse .getDefaultInstance ();
129
129
@@ -151,7 +151,8 @@ public void testPutRequest_json_populatedFields_success()
151
151
OutputStream stdout = testWorker .getFakeSubprocess ().getOutputStream ();
152
152
String requestJsonString =
153
153
"{\" arguments\" :[\" testRequest\" ],\" inputs\" :"
154
- + "[{\" path\" :\" testPath\" ,\" digest\" :\" dGVzdERpZ2VzdA==\" }],\" requestId\" :1,\" verbosity\" :11}" ;
154
+ + "[{\" path\" :\" testPath\" ,\" digest\" :\" dGVzdERpZ2VzdA==\" }],\" requestId\" :1,\" verbosity\" :11}"
155
+ + System .lineSeparator ();
155
156
assertThat (stdout .toString ()).isEqualTo (requestJsonString );
156
157
}
157
158
@@ -170,7 +171,8 @@ public void testGetResponse_json_populatedFields_success()
170
171
171
172
private void verifyGetResponseFailure (String responseString , String expectedError )
172
173
throws IOException {
173
- TestWorker testWorker = createTestWorker (responseString .getBytes (UTF_8 ), JSON );
174
+ TestWorker testWorker =
175
+ createTestWorker ((responseString + System .lineSeparator ()).getBytes (UTF_8 ), JSON );
174
176
IOException ex = assertThrows (IOException .class , () -> testWorker .getResponse (0 ));
175
177
assertThat (ex ).hasMessageThat ().contains (expectedError );
176
178
}
0 commit comments