Skip to content

Commit 4b0e316

Browse files
mszurapmszurap
and
mszurap
authored
tests fail on Windows #21 (#22)
Co-authored-by: mszurap <[email protected]>
1 parent 7f74955 commit 4b0e316

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

trace-agent-it/test_exec/src/test/java/TestTraceAgent.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,16 +95,16 @@ public void testTraceRetVal() throws IOException {
9595
public void testElapsedTime() throws IOException {
9696
String output = runTraceAgent("elapsed_time_in_nano net.test.TestClass test", "elapsed_time_in_ms net.test.TestClass2nd anotherMethod");
9797
Supplier<Stream<String>> streamSupplier = toStreamSupplier(output);
98-
assertTrue(streamSupplier.get().anyMatch(s -> s.matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ nano")));
99-
assertTrue(streamSupplier.get().anyMatch(s -> s.matches("TraceAgent \\(timing\\): `public void net.test.TestClass2nd.anotherMethod\\(\\)` took [0-9]+ ms")));
98+
assertTrue(streamSupplier.get().anyMatch(s -> s.trim().matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ nano")));
99+
assertTrue(streamSupplier.get().anyMatch(s -> s.trim().matches("TraceAgent \\(timing\\): `public void net.test.TestClass2nd.anotherMethod\\(\\)` took [0-9]+ ms")));
100100
}
101101

102102
@Test
103103
public void testMultipleActionsOnTheSameMethod() throws IOException {
104104
String output = runTraceAgent("elapsed_time_in_nano net.test.TestClass test", "elapsed_time_in_ms net.test.TestClass test");
105105
Supplier<Stream<String>> streamSupplier = toStreamSupplier(output);
106-
assertTrue(streamSupplier.get().anyMatch(s -> s.matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ nano")));
107-
assertTrue(streamSupplier.get().anyMatch(s -> s.matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ ms")));
106+
assertTrue(streamSupplier.get().anyMatch(s -> s.trim().matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ nano")));
107+
assertTrue(streamSupplier.get().anyMatch(s -> s.trim().matches("TraceAgent \\(timing\\): `public void net.test.TestClass.test\\(\\)` took [0-9]+ ms")));
108108
}
109109

110110
@Test

0 commit comments

Comments
 (0)