From 02700035561c030be45c81c93da50c266621f802 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 29 Apr 2021 16:07:37 +1000 Subject: [PATCH 1/3] Increase test timeouts --- src/lib/waku_relay/index.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/waku_relay/index.spec.ts b/src/lib/waku_relay/index.spec.ts index 0468c3665c..d86b1c58d3 100644 --- a/src/lib/waku_relay/index.spec.ts +++ b/src/lib/waku_relay/index.spec.ts @@ -93,7 +93,7 @@ describe('Waku Relay', () => { let nimWaku: NimWaku; beforeEach(async function () { - this.timeout(12_000); + this.timeout(30_000); waku = await Waku.create({ staticNoiseKey: NOISE_KEY_1, listenAddresses: ['/ip4/0.0.0.0/tcp/0'], @@ -167,7 +167,7 @@ describe('Waku Relay', () => { let nimWaku: NimWaku; beforeEach(async function () { - this.timeout(10_000); + this.timeout(30_000); waku = await Waku.create({ staticNoiseKey: NOISE_KEY_1, modules: { transport: [TCP] }, From 5664c147433d42ae74027d87159a16e118fa3147 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 29 Apr 2021 16:38:50 +1000 Subject: [PATCH 2/3] Check subscribers until it finds one --- src/lib/waku_relay/index.spec.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/lib/waku_relay/index.spec.ts b/src/lib/waku_relay/index.spec.ts index d86b1c58d3..c091d08e19 100644 --- a/src/lib/waku_relay/index.spec.ts +++ b/src/lib/waku_relay/index.spec.ts @@ -195,9 +195,12 @@ describe('Waku Relay', () => { }); it('nim subscribes to js', async function () { - const subscribers = waku.libp2p.pubsub.getSubscribers( - RelayDefaultTopic - ); + let subscribers: string[] = []; + + while (subscribers.length === 0) { + await delay(200); + subscribers = waku.libp2p.pubsub.getSubscribers(RelayDefaultTopic); + } const nimPeerId = await nimWaku.getPeerId(); expect(subscribers).to.contain(nimPeerId.toB58String()); From aa6b869da15a82241c6d5b9579f5302547f80116 Mon Sep 17 00:00:00 2001 From: Franck Royer Date: Thu, 29 Apr 2021 16:40:35 +1000 Subject: [PATCH 3/3] Test are too unstable to run on different environment Moreover the library targets browser execution so there is little value in running on several node instances. --- .github/workflows/ci.yml | 2 +- bors.toml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3dd6d7f41a..b81bc2519b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -14,7 +14,7 @@ jobs: BUF_VERSION: '0.41.0' strategy: matrix: - node: [14, 16] + node: [14] os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: diff --git a/bors.toml b/bors.toml index 813eae142f..5c0729b8c1 100644 --- a/bors.toml +++ b/bors.toml @@ -1,8 +1,6 @@ status = [ "build_and_test (14, ubuntu-latest)", - "build_and_test (16, ubuntu-latest)", "build_and_test (14, macos-latest)", - "build_and_test (16, macos-latest)", "web_chat_build_and_test" ] block_labels = ["work-in-progress"]