@@ -13,6 +13,10 @@ const whilst = require('async/whilst')
1313const each = require ( 'async/each' )
1414const hat = require ( 'hat' )
1515
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+
1620function waitForPeers ( ipfs , topic , peersToWait , callback ) {
1721 const i = setInterval ( ( ) => {
1822 ipfs . pubsub . peers ( topic , ( err , peers ) => {
@@ -67,6 +71,7 @@ module.exports = (common) => {
6771 let ipfs1
6872 let ipfs2
6973 let ipfs3
74+ let withGo
7075
7176 before ( function ( done ) {
7277 // CI takes longer to instantiate the daemon, so we need to increase the
@@ -90,7 +95,12 @@ module.exports = (common) => {
9095 ipfs1 = nodes [ 0 ]
9196 ipfs2 = nodes [ 1 ]
9297 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+ } )
94104 } )
95105 } )
96106 } )
@@ -497,7 +507,13 @@ module.exports = (common) => {
497507 } )
498508 } )
499509
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+
501517 const inbox1 = [ ]
502518 const inbox2 = [ ]
503519 const outbox = [ 'hello' , 'world' , 'this' , 'is' , 'pubsub' ]
@@ -566,16 +582,22 @@ module.exports = (common) => {
566582 let sub1
567583 let sub2
568584
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+
570592 topic = getTopic ( )
571593 } )
572594
573- after ( ( ) => {
595+ afterEach ( ( ) => {
574596 ipfs1 . pubsub . unsubscribe ( topic , sub1 )
575597 ipfs2 . pubsub . unsubscribe ( topic , sub2 )
576598 } )
577599
578- it . skip ( 'send/receive 10k messages' , function ( done ) {
600+ it ( 'send/receive 10k messages' , function ( done ) {
579601 this . timeout ( 2 * 60 * 1000 )
580602
581603 const msgBase = 'msg - '
0 commit comments