From 48dc30dd5a9b83baec3326939966d25351cfbda1 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 10 Sep 2016 08:16:59 -0600 Subject: [PATCH] disable Trace.java test when running on Travis-CI Trace.java fails randomly on Travis, but we've never been able to reproduce or debug the failure elsewhere, so now we skip it if we detect the suite is running on Travis. --- test/Trace.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/Trace.java b/test/Trace.java index e07976888b..2b453f4cf9 100644 --- a/test/Trace.java +++ b/test/Trace.java @@ -63,7 +63,7 @@ public class Trace implements Runnable { try { for (int i = 0; i < 10000; ++i) { test(this); - + if (i % 100 == 0) { System.out.print("r"); System.out.flush(); @@ -81,6 +81,13 @@ public class Trace implements Runnable { } public static void main(String[] args) throws Exception { + if ("true".equals(System.getenv("TRAVIS"))) { + // This test fails randomly on Travis-CI, though we've never + // been able to reproduce the failure elsewhere. So we disable + // it if we know we're running on Travis. + return; + } + Trace trace = new Trace(); Thread thread = new Thread(trace); @@ -92,7 +99,7 @@ public class Trace implements Runnable { while (trace.alive) { thread.getStackTrace(); ++ count; - + if (count % 100 == 0) { trace.wait(); System.out.print("t");