test: speed up

This commit is contained in:
Feross Aboukhadijeh 2015-03-24 01:02:10 -07:00
parent f575cfc3c9
commit d759456d7a

View File

@ -99,7 +99,7 @@ function testClientUpdate (t, serverType) {
t.plan(4)
common.createServer(t, serverType, function (server, announceUrl) {
parsedTorrent.announce = [ announceUrl ]
var client = new Client(peerId1, port, parsedTorrent, { interval: 5000 })
var client = new Client(peerId1, port, parsedTorrent, { interval: 2000 })
client.on('error', function (err) {
t.error(err)
@ -112,6 +112,7 @@ function testClientUpdate (t, serverType) {
client.start()
client.once('update', function () {
// after interval (2s), we should get another update
client.once('update', function (data) {
// received an update!
t.equal(data.announce, announceUrl)