< prev index next >

test/hotspot/jtreg/gc/shenandoah/TestPeriodicGC.java

Print this page
*** 44,14 ***
          cmds[args.length + 1] = "test";
          ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmds);
  
          OutputAnalyzer output = new OutputAnalyzer(pb.start());
          output.shouldHaveExitValue(0);
!         if (periodic && !output.getOutput().contains("Trigger: Time since last GC")) {
              throw new AssertionError(msg + ": Should have periodic GC in logs");
          }
!         if (!periodic && output.getOutput().contains("Trigger: Time since last GC")) {
              throw new AssertionError(msg + ": Should not have periodic GC in logs");
          }
      }
  
      public static void main(String[] args) throws Exception {
--- 44,14 ---
          cmds[args.length + 1] = "test";
          ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(cmds);
  
          OutputAnalyzer output = new OutputAnalyzer(pb.start());
          output.shouldHaveExitValue(0);
!         if (periodic && !output.getOutput().contains("Trigger (GLOBAL): Time since last GC")) {
              throw new AssertionError(msg + ": Should have periodic GC in logs");
          }
!         if (!periodic && output.getOutput().contains("Trigger (GLOBAL): Time since last GC")) {
              throw new AssertionError(msg + ": Should not have periodic GC in logs");
          }
      }
  
      public static void main(String[] args) throws Exception {
< prev index next >