From 9a6086b04aea0972e7f951e4a894f42c54a702d0 Mon Sep 17 00:00:00 2001 From: akwizgran <akwizgran@users.sourceforge.net> Date: Wed, 16 May 2012 15:24:45 +0200 Subject: [PATCH] Still trying to track down intermittent test failures under heavy load. --- .../plugins/socket/SimpleSocketPluginTest.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/test/net/sf/briar/plugins/socket/SimpleSocketPluginTest.java b/test/net/sf/briar/plugins/socket/SimpleSocketPluginTest.java index f2116e98fb..a5aa9c7169 100644 --- a/test/net/sf/briar/plugins/socket/SimpleSocketPluginTest.java +++ b/test/net/sf/briar/plugins/socket/SimpleSocketPluginTest.java @@ -46,7 +46,7 @@ public class SimpleSocketPluginTest extends BriarTestCase { InetSocketAddress addr = new InetSocketAddress(host, port); Socket s = new Socket(); s.connect(addr, 100); - assertTrue(callback.connectionsLatch.await(5, TimeUnit.SECONDS)); + assertTrue(callback.connectionsLatch.await(1, TimeUnit.MINUTES)); s.close(); // Stop the plugin plugin.stop(); @@ -90,7 +90,7 @@ public class SimpleSocketPluginTest extends BriarTestCase { DuplexTransportConnection d = plugin.createConnection(contactId); assertNotNull(d); // Check that the connection was accepted - assertTrue(latch.await(5, TimeUnit.SECONDS)); + assertTrue(latch.await(1, TimeUnit.MINUTES)); assertFalse(error.get()); // Clean up d.dispose(false, true); @@ -105,11 +105,10 @@ public class SimpleSocketPluginTest extends BriarTestCase { private final CountDownLatch propertiesLatch = new CountDownLatch(1); private final CountDownLatch connectionsLatch = new CountDownLatch(1); - private TransportConfig config = new TransportConfig(); - private TransportProperties local = new TransportProperties(); + private volatile TransportProperties local = new TransportProperties(); public TransportConfig getConfig() { - return config; + return new TransportConfig(); } public TransportProperties getLocalProperties() { @@ -120,9 +119,7 @@ public class SimpleSocketPluginTest extends BriarTestCase { return remote; } - public void setConfig(TransportConfig c) { - config = c; - } + public void setConfig(TransportConfig c) {} public void setLocalProperties(TransportProperties p) { local = p; -- GitLab