(TestProcess p)
| 17 | public class ProcTests { |
| 18 | |
| 19 | @Test(mainClass = BasicApp.class, os = Os.LINUX) |
| 20 | public void basicProcessSampling(TestProcess p) throws Exception { |
| 21 | p.profile("--proc 1 -d 3 -f %f.jfr"); |
| 22 | try (JfrReader jfr = new JfrReader(p.getFilePath("%f"))) { |
| 23 | List<ProcessSample> events = jfr.readAllEvents(ProcessSample.class); |
| 24 | assert !events.isEmpty(); |
| 25 | |
| 26 | List<ProcessSample> appSamples = events.stream() |
| 27 | .filter(e -> e.cmdLine != null && e.cmdLine.contains("BasicApp")) |
| 28 | .collect(Collectors.toList()); |
| 29 | |
| 30 | Assert.isEqual(appSamples.size(), 2); // We discard the first sample |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // TODO(issue-1432): Re-enable after tiered integration tests are supported. |
| 35 | // @Test(mainClass = BasicApp.class, os = Os.LINUX) |
nothing calls this directly
no test coverage detected