tests: use publicbt.com

seems to have more lenient rate limiting
This commit is contained in:
Feross Aboukhadijeh 2014-03-27 21:29:00 -07:00
parent 4b6a3b8cf9
commit b406d4ec5e
2 changed files with 10 additions and 10 deletions

View File

@ -14,7 +14,7 @@ test('client.start()', function (t) {
var client = new Client(peerId, port, parsedTorrent)
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.once('update', function (data) {
@ -37,7 +37,7 @@ test('client.stop()', function (t) {
var client = new Client(peerId, port, parsedTorrent)
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.start()
@ -64,7 +64,7 @@ test('client.update()', function (t) {
var client = new Client(peerId, port, parsedTorrent, { interval: 5000 })
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.start()

View File

@ -7,7 +7,7 @@ var torrent = fs.readFileSync(__dirname + '/torrents/leaves.torrent')
var parsedTorrent = parseTorrent(torrent)
// remove all tracker servers except a single UDP one, for now
parsedTorrent.announce = [ 'udp://tracker.openbittorrent.com:80' ]
parsedTorrent.announce = [ 'udp://tracker.publicbt.com:80' ]
var peerId = new Buffer('01234567890123456789')
var port = 6881
@ -18,11 +18,11 @@ test('udp: client.start()', function (t) {
var client = new Client(peerId, port, parsedTorrent)
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.once('update', function (data) {
t.equal(data.announce, 'udp://tracker.openbittorrent.com:80')
t.equal(data.announce, 'udp://tracker.publicbt.com:80')
t.equal(typeof data.complete, 'number')
t.equal(typeof data.incomplete, 'number')
})
@ -41,7 +41,7 @@ test('udp: client.stop()', function (t) {
var client = new Client(peerId, port, parsedTorrent)
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.start()
@ -51,7 +51,7 @@ test('udp: client.stop()', function (t) {
client.once('update', function (data) {
// receive one final update after calling stop
t.equal(data.announce, 'udp://tracker.openbittorrent.com:80')
t.equal(data.announce, 'udp://tracker.publicbt.com:80')
t.equal(typeof data.complete, 'number')
t.equal(typeof data.incomplete, 'number')
})
@ -65,7 +65,7 @@ test('udp: client.update()', function (t) {
var client = new Client(peerId, port, parsedTorrent, { interval: 5000 })
client.on('error', function (err) {
t.fail(err.message)
t.error(err)
})
client.start()
@ -74,7 +74,7 @@ test('udp: client.update()', function (t) {
client.once('update', function (data) {
// received an update!
t.equal(data.announce, 'udp://tracker.openbittorrent.com:80')
t.equal(data.announce, 'udp://tracker.publicbt.com:80')
t.equal(typeof data.complete, 'number')
t.equal(typeof data.incomplete, 'number')
client.stop()