Skip to content

Commit

Permalink
chore: tweak test timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
wemeetagain committed Jun 5, 2020
1 parent 9a34091 commit 2303125
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/peerScore.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ describe('PeerScore', () => {
ps.graft(peerA, mytopic)

// wait for the activation time to kick in
await new Promise(resolve => setTimeout(resolve, tparams.meshMessageDeliveriesActivation))
await new Promise(resolve => setTimeout(resolve, tparams.meshMessageDeliveriesActivation + 10))

// deliver a bunch of messages from peer A
const nMessages = 40
Expand Down Expand Up @@ -395,7 +395,7 @@ describe('PeerScore', () => {
})

// wait for the activation time to kick in
await new Promise(resolve => setTimeout(resolve, tparams.meshMessageDeliveriesActivation))
await new Promise(resolve => setTimeout(resolve, tparams.meshMessageDeliveriesActivation + 10))

// deliver a bunch of messages from peer A. peer B does nothing
const nMessages = 100
Expand Down Expand Up @@ -538,7 +538,7 @@ describe('PeerScore', () => {

// now clear the delivery record
ps.deliveryRecords.queue.peekFront().expire = Date.now()
await new Promise(resolve => setTimeout(resolve, 1))
await new Promise(resolve => setTimeout(resolve, 5))
ps.deliveryRecords.gc()

// insert a new record in the message deliveries
Expand All @@ -556,7 +556,7 @@ describe('PeerScore', () => {

// now clear the delivery record again
ps.deliveryRecords.queue.peekFront().expire = Date.now()
await new Promise(resolve => setTimeout(resolve, 1))
await new Promise(resolve => setTimeout(resolve, 5))
ps.deliveryRecords.gc()

// insert a new record in the message deliveries
Expand Down

0 comments on commit 2303125

Please sign in to comment.