File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/rsocket-router/tests/src Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -7,15 +7,21 @@ import { WebsocketServerTransport } from '../../src/router/transport/WebSocketSe
77import { WebsocketDuplexConnection } from '../../src/router/transport/WebsocketDuplexConnection.js' ;
88import { Duplex } from 'stream' ;
99
10- const WS_PORT = process . env . WS_PORT ? parseInt ( process . env . WS_PORT ) : 4532 ;
11- const WS_ADDRESS = `ws://localhost:${ WS_PORT } ` ;
10+ let nextPort = 5433 ;
1211
1312describe ( 'Sockets' , ( ) => {
1413 let server : WebSocket . WebSocketServer ;
1514 let closeServer : ( ) => void ;
1615
16+ let WS_PORT = 0 ;
17+ let WS_ADDRESS = '' ;
18+
1719 beforeEach ( ( ) => {
1820 let closed = false ;
21+
22+ WS_PORT = process . env . WS_PORT ? parseInt ( process . env . WS_PORT ) : nextPort ++ ;
23+ WS_ADDRESS = `ws://localhost:${ WS_PORT } ` ;
24+
1925 server = new WebSocket . WebSocketServer ( {
2026 port : WS_PORT
2127 } ) ;
You can’t perform that action at this time.
0 commit comments