From 01fd605363ce5941b3952763e2e910b46f174921 Mon Sep 17 00:00:00 2001 From: Lezek123 Date: Thu, 16 Feb 2023 19:58:31 +0100 Subject: [PATCH 1/2] Increase storageSync QN timeout even more (15m) --- tests/network-tests/src/flows/storage/storageSync.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/network-tests/src/flows/storage/storageSync.ts b/tests/network-tests/src/flows/storage/storageSync.ts index f0e6c410f0..f6f8ba5980 100644 --- a/tests/network-tests/src/flows/storage/storageSync.ts +++ b/tests/network-tests/src/flows/storage/storageSync.ts @@ -62,15 +62,13 @@ export async function storageSync({ api, query }: FlowProps): Promise { await api.sendExtrinsicsAndGetResults(createChannelTxBatch, memberAddr) } - debug('Giving the query node 2 minutes to sync...') - await Utils.wait(120_000) - + debug('Waiting until the query node processes 10_000 channels...') // Make sure there are indeed 10_000 channels processed by the QN await query.tryQueryWithTimeout( () => query.getChannelsCount(), (r) => assert.equal(r, 10_000), - 12, - 10 + 9, + 100 // 9 * 100 = 900s = 15 minutes timeout ) // Create channel w/ some data objects From 41bb22b78eb3e7a321e161a4ba0621b26b422682 Mon Sep 17 00:00:00 2001 From: Lezek123 Date: Thu, 16 Feb 2023 20:32:05 +0100 Subject: [PATCH 2/2] Fix: `tryQueryWithTimeout` seconds passed instead of miliseconds --- tests/network-tests/src/flows/storage/storageSync.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/network-tests/src/flows/storage/storageSync.ts b/tests/network-tests/src/flows/storage/storageSync.ts index f6f8ba5980..86dc6f2a43 100644 --- a/tests/network-tests/src/flows/storage/storageSync.ts +++ b/tests/network-tests/src/flows/storage/storageSync.ts @@ -67,8 +67,8 @@ export async function storageSync({ api, query }: FlowProps): Promise { await query.tryQueryWithTimeout( () => query.getChannelsCount(), (r) => assert.equal(r, 10_000), - 9, - 100 // 9 * 100 = 900s = 15 minutes timeout + 10_000, + 30 // 10s * 30 = 300s = 5 minutes timeout ) // Create channel w/ some data objects