@@ -13,6 +13,11 @@ const whilst = require('async/whilst')
13
13
const each = require ( 'async/each' )
14
14
const hat = require ( 'hat' )
15
15
16
+ let isWindows = false
17
+ if ( process . platform && process . platform === 'win32' ) {
18
+ isWindows = true
19
+ }
20
+
16
21
function waitForPeers ( ipfs , topic , peersToWait , callback ) {
17
22
const i = setInterval ( ( ) => {
18
23
ipfs . pubsub . peers ( topic , ( err , peers ) => {
@@ -67,6 +72,7 @@ module.exports = (common) => {
67
72
let ipfs1
68
73
let ipfs2
69
74
let ipfs3
75
+ let withGo
70
76
71
77
before ( function ( done ) {
72
78
// CI takes longer to instantiate the daemon, so we need to increase the
@@ -90,7 +96,12 @@ module.exports = (common) => {
90
96
ipfs1 = nodes [ 0 ]
91
97
ipfs2 = nodes [ 1 ]
92
98
ipfs3 = nodes [ 2 ]
93
- done ( )
99
+
100
+ ipfs1 . id ( ( err , id ) => {
101
+ expect ( err ) . to . not . exist ( )
102
+ withGo = id . agentVersion . startsWith ( 'go-ipfs' )
103
+ done ( )
104
+ } )
94
105
} )
95
106
} )
96
107
} )
@@ -497,7 +508,13 @@ module.exports = (common) => {
497
508
} )
498
509
} )
499
510
500
- it ( 'receive multiple messages' , ( done ) => {
511
+ it ( 'receive multiple messages' , function ( done ) {
512
+ // TODO fix https://github.com/ipfs/interface-ipfs-core/pull/188#issuecomment-354673246
513
+ // and https://github.com/ipfs/go-ipfs/issues/4778
514
+ if ( withGo && isWindows ) {
515
+ this . skip ( )
516
+ }
517
+
501
518
const inbox1 = [ ]
502
519
const inbox2 = [ ]
503
520
const outbox = [ 'hello' , 'world' , 'this' , 'is' , 'pubsub' ]
@@ -566,16 +583,22 @@ module.exports = (common) => {
566
583
let sub1
567
584
let sub2
568
585
569
- before ( ( ) => {
586
+ beforeEach ( function ( ) {
587
+ // TODO fix https://github.com/ipfs/interface-ipfs-core/pull/188#issuecomment-354673246
588
+ // and https://github.com/ipfs/go-ipfs/issues/4778
589
+ if ( withGo && isWindows ) {
590
+ this . skip ( )
591
+ }
592
+
570
593
topic = getTopic ( )
571
594
} )
572
595
573
- after ( ( ) => {
596
+ afterEach ( ( ) => {
574
597
ipfs1 . pubsub . unsubscribe ( topic , sub1 )
575
598
ipfs2 . pubsub . unsubscribe ( topic , sub2 )
576
599
} )
577
600
578
- it . skip ( 'send/receive 10k messages' , function ( done ) {
601
+ it ( 'send/receive 10k messages' , function ( done ) {
579
602
this . timeout ( 2 * 60 * 1000 )
580
603
581
604
const msgBase = 'msg - '
0 commit comments