Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit c7d47e3

Browse files
daviddiasvmx
authored andcommitted
fix: only skip if it is go-ipfs
Currently those tests are only failing on Windows, but currently there's no good way to check the platform. Hence skipping whenver go-ipfs is used.
1 parent 6aeca2f commit c7d47e3

File tree

1 file changed

+23
-5
lines changed

1 file changed

+23
-5
lines changed

js/src/pubsub.js

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ module.exports = (common) => {
6767
let ipfs1
6868
let ipfs2
6969
let ipfs3
70+
let withGo
7071

7172
before(function (done) {
7273
// CI takes longer to instantiate the daemon, so we need to increase the
@@ -90,7 +91,12 @@ module.exports = (common) => {
9091
ipfs1 = nodes[0]
9192
ipfs2 = nodes[1]
9293
ipfs3 = nodes[2]
93-
done()
94+
95+
ipfs1.id((err, id) => {
96+
expect(err).to.not.exist()
97+
withGo = id.agentVersion.startsWith('go-ipfs')
98+
done()
99+
})
94100
})
95101
})
96102
})
@@ -497,7 +503,13 @@ module.exports = (common) => {
497503
})
498504
})
499505

500-
it('receive multiple messages', (done) => {
506+
it('receive multiple messages', function (done) {
507+
// TODO fix https://github.com/ipfs/interface-ipfs-core/pull/188#issuecomment-354673246
508+
// and https://github.com/ipfs/go-ipfs/issues/4778
509+
if (withGo) {
510+
this.skip()
511+
}
512+
501513
const inbox1 = []
502514
const inbox2 = []
503515
const outbox = ['hello', 'world', 'this', 'is', 'pubsub']
@@ -566,16 +578,22 @@ module.exports = (common) => {
566578
let sub1
567579
let sub2
568580

569-
before(() => {
581+
beforeEach(function () {
582+
// TODO fix https://github.com/ipfs/interface-ipfs-core/pull/188#issuecomment-354673246
583+
// and https://github.com/ipfs/go-ipfs/issues/4778
584+
if (withGo) {
585+
this.skip()
586+
}
587+
570588
topic = getTopic()
571589
})
572590

573-
after(() => {
591+
afterEach(() => {
574592
ipfs1.pubsub.unsubscribe(topic, sub1)
575593
ipfs2.pubsub.unsubscribe(topic, sub2)
576594
})
577595

578-
it.skip('send/receive 10k messages', function (done) {
596+
it('send/receive 10k messages', function (done) {
579597
this.timeout(2 * 60 * 1000)
580598

581599
const msgBase = 'msg - '

0 commit comments

Comments
 (0)