mirror of
https://github.com/vacp2p/linea-besu.git
synced 2026-01-09 15:37:54 -05:00
Changing WebSocketService test to use random port (#5)
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
This commit is contained in:
@@ -38,6 +38,8 @@ public class WebSocketServiceTest {
|
||||
vertx = Vertx.vertx();
|
||||
|
||||
websocketConfiguration = WebSocketConfiguration.createDefault();
|
||||
websocketConfiguration.setPort(0);
|
||||
|
||||
final Map<String, JsonRpcMethod> websocketMethods =
|
||||
new WebSocketMethodsFactory(new SubscriptionManager(), new HashMap<>()).methods();
|
||||
webSocketRequestHandlerSpy = spy(new WebSocketRequestHandler(vertx, websocketMethods));
|
||||
@@ -45,6 +47,8 @@ public class WebSocketServiceTest {
|
||||
websocketService =
|
||||
new WebSocketService(vertx, websocketConfiguration, webSocketRequestHandlerSpy);
|
||||
websocketService.start().join();
|
||||
|
||||
websocketConfiguration.setPort(websocketService.socketAddress().getPort());
|
||||
}
|
||||
|
||||
@After
|
||||
|
||||
Reference in New Issue
Block a user