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