diff --git a/muxrpc/test/nodejs/testscripts/client-opening-tunnel.js b/muxrpc/test/nodejs/testscripts/client-opening-tunnel.js index 295c12b..03fa639 100644 --- a/muxrpc/test/nodejs/testscripts/client-opening-tunnel.js +++ b/muxrpc/test/nodejs/testscripts/client-opening-tunnel.js @@ -25,6 +25,8 @@ module.exports = (t, client, roomrpc, exit) => { roomrpc.tunnel.endpoints(), pull.drain(el => { comment(`from roomsrv: ${JSON.stringify(el)}`) + }, (err) => { + t.comment('endpoints closed', err) }) ) diff --git a/muxrpc/test/nodejs/testscripts/client.js b/muxrpc/test/nodejs/testscripts/client.js index 5aeb298..8858aaa 100644 --- a/muxrpc/test/nodejs/testscripts/client.js +++ b/muxrpc/test/nodejs/testscripts/client.js @@ -19,10 +19,10 @@ module.exports = (t, sbot, rpc, exit) => { t.error(err, 'tunnel.leave') comment(`tunnel error: ${err}`) comment(`leave value: ${ret}`) - comment('left, exiting in 1s') - setTimeout(exit, 1000) + comment('left, exiting in 3s') + setTimeout(exit, 3000) }) - }, 3000) + }, 1000) }) // announce ourselves to the room/tunnel @@ -38,6 +38,8 @@ module.exports = (t, sbot, rpc, exit) => { rpc.tunnel.endpoints(), pull.drain(el => { comment(`from roomsrv: ${el}`) + }, (err) => { + t.comment('endpoints closed', err) }) ) } diff --git a/muxrpc/test/nodejs/tunnel_connect_test.go b/muxrpc/test/nodejs/tunnel_connect_test.go index 28b7853..90b2766 100644 --- a/muxrpc/test/nodejs/tunnel_connect_test.go +++ b/muxrpc/test/nodejs/tunnel_connect_test.go @@ -159,7 +159,7 @@ func TestClientSurvivesShutdown(t *testing.T) { ) // give them time to connect (which would make them pass the test) - time.Sleep(6 * time.Second) + time.Sleep(8 * time.Second) // shut down server (which closes all the muxrpc streams) srv.Close()