mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-20 22:59:54 +01:00
Increased some timeouts to stop tests from failing under load.
This commit is contained in:
@@ -50,7 +50,7 @@ public class PollingRemovableDriveMonitorTest extends BriarTestCase {
|
|||||||
Executors.newCachedThreadPool(), finder, 10);
|
Executors.newCachedThreadPool(), finder, 10);
|
||||||
monitor.start(callback);
|
monitor.start(callback);
|
||||||
// Wait for the monitor to detect the files
|
// Wait for the monitor to detect the files
|
||||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||||
monitor.stop();
|
monitor.stop();
|
||||||
// Check that both files were detected
|
// Check that both files were detected
|
||||||
assertEquals(2, detected.size());
|
assertEquals(2, detected.size());
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ public class UnixRemovableDriveMonitorTest extends BriarTestCase {
|
|||||||
assertTrue(file1.createNewFile());
|
assertTrue(file1.createNewFile());
|
||||||
assertTrue(file2.createNewFile());
|
assertTrue(file2.createNewFile());
|
||||||
// Wait for the monitor to detect the files
|
// Wait for the monitor to detect the files
|
||||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||||
monitor.stop();
|
monitor.stop();
|
||||||
// Check that both files were detected
|
// Check that both files were detected
|
||||||
assertEquals(2, detected.size());
|
assertEquals(2, detected.size());
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ public class SimpleSocketPluginTest extends BriarTestCase {
|
|||||||
SimpleSocketPlugin plugin = new SimpleSocketPlugin(e, callback, 0L);
|
SimpleSocketPlugin plugin = new SimpleSocketPlugin(e, callback, 0L);
|
||||||
plugin.start();
|
plugin.start();
|
||||||
// The plugin should have bound a socket and stored the port number
|
// The plugin should have bound a socket and stored the port number
|
||||||
callback.latch.await(1, TimeUnit.SECONDS);
|
callback.latch.await(5, TimeUnit.SECONDS);
|
||||||
String host = callback.local.get("internal");
|
String host = callback.local.get("internal");
|
||||||
assertNotNull(host);
|
assertNotNull(host);
|
||||||
assertEquals("127.0.0.1", host);
|
assertEquals("127.0.0.1", host);
|
||||||
@@ -93,7 +93,7 @@ public class SimpleSocketPluginTest extends BriarTestCase {
|
|||||||
DuplexTransportConnection d = plugin.createConnection(contactId);
|
DuplexTransportConnection d = plugin.createConnection(contactId);
|
||||||
assertNotNull(d);
|
assertNotNull(d);
|
||||||
// Check that the connection was accepted
|
// Check that the connection was accepted
|
||||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||||
assertFalse(error.get());
|
assertFalse(error.get());
|
||||||
// Clean up
|
// Clean up
|
||||||
d.dispose(false, true);
|
d.dispose(false, true);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class TorPluginTest extends BriarTestCase {
|
|||||||
TorPlugin serverPlugin = new TorPlugin(e, serverCallback, 0L);
|
TorPlugin serverPlugin = new TorPlugin(e, serverCallback, 0L);
|
||||||
serverPlugin.start();
|
serverPlugin.start();
|
||||||
// The plugin should create a hidden service... eventually
|
// The plugin should create a hidden service... eventually
|
||||||
serverCallback.latch.await(300, TimeUnit.SECONDS);
|
serverCallback.latch.await(10, TimeUnit.MINUTES);
|
||||||
String onion = serverCallback.local.get("onion");
|
String onion = serverCallback.local.get("onion");
|
||||||
assertNotNull(onion);
|
assertNotNull(onion);
|
||||||
assertTrue(onion.endsWith(".onion"));
|
assertTrue(onion.endsWith(".onion"));
|
||||||
@@ -69,7 +69,7 @@ public class TorPluginTest extends BriarTestCase {
|
|||||||
TorPlugin plugin = new TorPlugin(e, callback, 0L);
|
TorPlugin plugin = new TorPlugin(e, callback, 0L);
|
||||||
plugin.start();
|
plugin.start();
|
||||||
// The plugin should create a hidden service... eventually
|
// The plugin should create a hidden service... eventually
|
||||||
callback.latch.await(300, TimeUnit.SECONDS);
|
callback.latch.await(10, TimeUnit.MINUTES);
|
||||||
String onion = callback.local.get("onion");
|
String onion = callback.local.get("onion");
|
||||||
assertNotNull(onion);
|
assertNotNull(onion);
|
||||||
assertTrue(onion.endsWith(".onion"));
|
assertTrue(onion.endsWith(".onion"));
|
||||||
@@ -83,7 +83,7 @@ public class TorPluginTest extends BriarTestCase {
|
|||||||
plugin = new TorPlugin(e, callback, 0L);
|
plugin = new TorPlugin(e, callback, 0L);
|
||||||
plugin.start();
|
plugin.start();
|
||||||
// The plugin should create a hidden service... eventually
|
// The plugin should create a hidden service... eventually
|
||||||
callback.latch.await(300, TimeUnit.SECONDS);
|
callback.latch.await(10, TimeUnit.MINUTES);
|
||||||
// The onion URL should be the same
|
// The onion URL should be the same
|
||||||
assertEquals(onion, callback.local.get("onion"));
|
assertEquals(onion, callback.local.get("onion"));
|
||||||
// The private key should be the same
|
// The private key should be the same
|
||||||
|
|||||||
Reference in New Issue
Block a user