mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 11:19:04 +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);
|
||||
monitor.start(callback);
|
||||
// Wait for the monitor to detect the files
|
||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||
monitor.stop();
|
||||
// Check that both files were detected
|
||||
assertEquals(2, detected.size());
|
||||
|
||||
@@ -64,7 +64,7 @@ public class UnixRemovableDriveMonitorTest extends BriarTestCase {
|
||||
assertTrue(file1.createNewFile());
|
||||
assertTrue(file2.createNewFile());
|
||||
// Wait for the monitor to detect the files
|
||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||
monitor.stop();
|
||||
// Check that both files were detected
|
||||
assertEquals(2, detected.size());
|
||||
|
||||
@@ -34,7 +34,7 @@ public class SimpleSocketPluginTest extends BriarTestCase {
|
||||
SimpleSocketPlugin plugin = new SimpleSocketPlugin(e, callback, 0L);
|
||||
plugin.start();
|
||||
// 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");
|
||||
assertNotNull(host);
|
||||
assertEquals("127.0.0.1", host);
|
||||
@@ -93,7 +93,7 @@ public class SimpleSocketPluginTest extends BriarTestCase {
|
||||
DuplexTransportConnection d = plugin.createConnection(contactId);
|
||||
assertNotNull(d);
|
||||
// Check that the connection was accepted
|
||||
assertTrue(latch.await(1, TimeUnit.SECONDS));
|
||||
assertTrue(latch.await(5, TimeUnit.SECONDS));
|
||||
assertFalse(error.get());
|
||||
// Clean up
|
||||
d.dispose(false, true);
|
||||
|
||||
@@ -30,7 +30,7 @@ public class TorPluginTest extends BriarTestCase {
|
||||
TorPlugin serverPlugin = new TorPlugin(e, serverCallback, 0L);
|
||||
serverPlugin.start();
|
||||
// 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");
|
||||
assertNotNull(onion);
|
||||
assertTrue(onion.endsWith(".onion"));
|
||||
@@ -69,7 +69,7 @@ public class TorPluginTest extends BriarTestCase {
|
||||
TorPlugin plugin = new TorPlugin(e, callback, 0L);
|
||||
plugin.start();
|
||||
// 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");
|
||||
assertNotNull(onion);
|
||||
assertTrue(onion.endsWith(".onion"));
|
||||
@@ -83,7 +83,7 @@ public class TorPluginTest extends BriarTestCase {
|
||||
plugin = new TorPlugin(e, callback, 0L);
|
||||
plugin.start();
|
||||
// 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
|
||||
assertEquals(onion, callback.local.get("onion"));
|
||||
// The private key should be the same
|
||||
|
||||
Reference in New Issue
Block a user