public void setUp() throws Exception { super.setUp(); deploymentSnapshots = null; totDeployed = 0; killedNode = 0; aliveNodes = null; }
/** * Create an array of random bytes * * @param length The length of the created array * @return the byte array */ public static byte[] randomByteArray(int length) { return randomByteArray(length, false, (byte) 0); }
/** * Creates a Buffer of random bytes. * * @param length The length of the Buffer * @return the Buffer */ public static Buffer randomBuffer(int length) { return randomBuffer(length, false, (byte) 0); }
@Override public void setUp() throws Exception { super.setUp(); randType = TestUtils.randomElement(ProxyType.values()); randHost = TestUtils.randomAlphaString(10); randPort = TestUtils.randomPortInt(); randUsername = TestUtils.randomAlphaString(10); randPassword = TestUtils.randomAlphaString(10); }
public void tearDown() throws Exception { super.tearDown(); }
public void setUp() throws Exception { super.setUp(); vinit(); VertxOptions options = getOptions(); boolean nativeTransport = options.getPreferNativeTransport(); vertx = Vertx.vertx(options); if (nativeTransport) { assertTrue(vertx.isNativeTransportEnabled()); } }
public void setUp() throws Exception { super.setUp(); disableThreadChecks(); executor = Executors.newFixedThreadPool(10); }
public static <E> E randomElement(E[] array) { return array[randomPositiveInt() % array.length]; }
protected void tearDown() throws Exception { if (vertx != null) { close(vertx); } if (created != null) { closeClustered(created); } FakeClusterManager.reset(); // Bit ugly super.tearDown(); }
protected void startNodes(int numNodes) { startNodes(numNodes, getOptions()); }
protected void fail(Throwable cause) { checkThread(); handleThrowable(cause); }
@Override public Statement apply( Statement statement, Description description ) { Statement result = statement; Repeat repeat = description.getAnnotation(Repeat.class); if( repeat != null ) { int times = repeat.times(); result = new RepeatStatement( times, statement ); } return result; } }
protected void assertWaitUntil(BooleanSupplier supplier, long timeout) { AsyncTestBase.assertWaitUntil(supplier, timeout); }
FakeConnection awaitConnected() { waitUntil(() -> { synchronized (FakeConnection.this) { return status == CONNECTED; } }); return this; }
protected void tearDown() throws Exception { tearingDown = true; afterAsyncTestBase(); }
protected void await() { await(2, TimeUnit.MINUTES); }
protected void assertWaitUntil(BooleanSupplier supplier) { AsyncTestBase.assertWaitUntil(supplier, 20000); }
public static void waitUntil(BooleanSupplier supplier) { waitUntil(supplier, 10000); }
public static void assertWaitUntil(BooleanSupplier supplier) { assertWaitUntil(supplier, 10000); }
protected void assertWaitUntil(BooleanSupplier supplier, String reason) { AsyncTestBase.assertWaitUntil(supplier, 20000, reason); }