|
|
@ -82,6 +82,8 @@ import okhttp3.RequestBody; |
|
|
|
import okhttp3.Response; |
|
|
|
import okhttp3.Response; |
|
|
|
import org.apache.tuweni.units.bigints.UInt256; |
|
|
|
import org.apache.tuweni.units.bigints.UInt256; |
|
|
|
import org.awaitility.Awaitility; |
|
|
|
import org.awaitility.Awaitility; |
|
|
|
|
|
|
|
import org.junit.After; |
|
|
|
|
|
|
|
import org.junit.Before; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Rule; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.Test; |
|
|
|
import org.junit.rules.TemporaryFolder; |
|
|
|
import org.junit.rules.TemporaryFolder; |
|
|
@ -94,6 +96,18 @@ public final class RunnerTest { |
|
|
|
private static final int MAX_BACKGROUND_COMPACTIONS = 4; |
|
|
|
private static final int MAX_BACKGROUND_COMPACTIONS = 4; |
|
|
|
private static final int BACKGROUND_THREAD_COUNT = 4; |
|
|
|
private static final int BACKGROUND_THREAD_COUNT = 4; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private Vertx vertx; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Before |
|
|
|
|
|
|
|
public void initVertx() { |
|
|
|
|
|
|
|
vertx = Vertx.vertx(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@After |
|
|
|
|
|
|
|
public void stopVertx() { |
|
|
|
|
|
|
|
vertx.close(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Rule public final TemporaryFolder temp = new TemporaryFolder(); |
|
|
|
@Rule public final TemporaryFolder temp = new TemporaryFolder(); |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
@ -179,7 +193,7 @@ public final class RunnerTest { |
|
|
|
final MetricsConfiguration aheadMetricsConfiguration = metricsConfiguration(); |
|
|
|
final MetricsConfiguration aheadMetricsConfiguration = metricsConfiguration(); |
|
|
|
final RunnerBuilder runnerBuilder = |
|
|
|
final RunnerBuilder runnerBuilder = |
|
|
|
new RunnerBuilder() |
|
|
|
new RunnerBuilder() |
|
|
|
.vertx(Vertx.vertx()) |
|
|
|
.vertx(vertx) |
|
|
|
.discovery(true) |
|
|
|
.discovery(true) |
|
|
|
.p2pAdvertisedHost(listenHost) |
|
|
|
.p2pAdvertisedHost(listenHost) |
|
|
|
.p2pListenPort(0) |
|
|
|
.p2pListenPort(0) |
|
|
@ -313,7 +327,7 @@ public final class RunnerTest { |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
final Future<Void> future = Future.future(); |
|
|
|
final Future<Void> future = Future.future(); |
|
|
|
final HttpClient httpClient = Vertx.vertx().createHttpClient(); |
|
|
|
final HttpClient httpClient = vertx.createHttpClient(); |
|
|
|
httpClient.websocket( |
|
|
|
httpClient.websocket( |
|
|
|
runnerBehind.getWebsocketPort().get(), |
|
|
|
runnerBehind.getWebsocketPort().get(), |
|
|
|
WebSocketConfiguration.DEFAULT_WEBSOCKET_HOST, |
|
|
|
WebSocketConfiguration.DEFAULT_WEBSOCKET_HOST, |
|
|
|