dont use pull.drain without done cb in test code
and change timeouts slightly
This commit is contained in:
parent
97dc3c2df5
commit
9b9db80406
|
@ -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)
|
||||
})
|
||||
)
|
||||
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue