File tree 1 file changed +4
-4
lines changed
trace-agent-it/test_exec/src/test/java 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -95,16 +95,16 @@ public void testTraceRetVal() throws IOException {
95
95
public void testElapsedTime () throws IOException {
96
96
String output = runTraceAgent ("elapsed_time_in_nano net.test.TestClass test" , "elapsed_time_in_ms net.test.TestClass2nd anotherMethod" );
97
97
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" )));
100
100
}
101
101
102
102
@ Test
103
103
public void testMultipleActionsOnTheSameMethod () throws IOException {
104
104
String output = runTraceAgent ("elapsed_time_in_nano net.test.TestClass test" , "elapsed_time_in_ms net.test.TestClass test" );
105
105
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" )));
108
108
}
109
109
110
110
@ Test
You can’t perform that action at this time.
0 commit comments