diff --git a/core/java/test/junit/net/i2p/util/LogSettingsTest.java b/core/java/test/junit/net/i2p/util/LogSettingsTest.java index 529190a77..123d0863d 100644 --- a/core/java/test/junit/net/i2p/util/LogSettingsTest.java +++ b/core/java/test/junit/net/i2p/util/LogSettingsTest.java @@ -88,10 +88,11 @@ public class LogSettingsTest extends TestCase { log.warn("DEBUG" + ": warn"); log.error("DEBUG" + ": error"); log.log(Log.CRIT, "DEBUG" + ": crit"); + _context.logManager().flush(); // Wait for the LogWriter to flush, then write extra stuff so // the test doesn't hang on failure - try { Thread.sleep(12*1000); } catch (InterruptedException ie) {} + try { Thread.sleep(1000); } catch (InterruptedException ie) {} for (int i = 0; i < 5; i++) pout.println(""); pout.flush(); @@ -137,10 +138,11 @@ public class LogSettingsTest extends TestCase { log.warn("INFO" + ": warn"); log.error("INFO" + ": error"); log.log(Log.CRIT, "INFO" + ": crit"); + _context.logManager().flush(); // Wait for the LogWriter to flush, then write extra stuff so // the test doesn't hang on failure - try { Thread.sleep(12*1000); } catch (InterruptedException ie) {} + try { Thread.sleep(1000); } catch (InterruptedException ie) {} for (int i = 0; i < 4; i++) pout.println(""); pout.flush(); @@ -184,10 +186,11 @@ public class LogSettingsTest extends TestCase { log.warn("WARN" + ": warn"); log.error("WARN" + ": error"); log.log(Log.CRIT, "WARN" + ": crit"); + _context.logManager().flush(); // Wait for the LogWriter to flush, then write extra stuff so // the test doesn't hang on failure - try { Thread.sleep(12*1000); } catch (InterruptedException ie) {} + try { Thread.sleep(1000); } catch (InterruptedException ie) {} for (int i = 0; i < 3; i++) pout.println(""); pout.flush(); @@ -228,10 +231,11 @@ public class LogSettingsTest extends TestCase { log.warn("ERROR" + ": warn"); log.error("ERROR" + ": error"); log.log(Log.CRIT, "ERROR" + ": crit"); + _context.logManager().flush(); // Wait for the LogWriter to flush, then write extra stuff so // the test doesn't hang on failure - try { Thread.sleep(12*1000); } catch (InterruptedException ie) {} + try { Thread.sleep(1000); } catch (InterruptedException ie) {} for (int i = 0; i < 2; i++) pout.println(""); pout.flush(); @@ -270,10 +274,11 @@ public class LogSettingsTest extends TestCase { log.warn("CRIT" + ": warn"); log.error("CRIT" + ": error"); log.log(Log.CRIT, "CRIT" + ": crit"); + _context.logManager().flush(); // Wait for the LogWriter to flush, then write extra stuff so // the test doesn't hang on failure - try { Thread.sleep(12*1000); } catch (InterruptedException ie) {} + try { Thread.sleep(1000); } catch (InterruptedException ie) {} pout.println(""); pout.flush(); String l1 = in.readLine();