diff --git a/tests/network-tests/package.json b/tests/network-tests/package.json index 37a2b33370..0bf8882b42 100644 --- a/tests/network-tests/package.json +++ b/tests/network-tests/package.json @@ -33,7 +33,8 @@ "long": "^4.0.0", "node-cleanup": "^2.1.2", "@joystream/js": "^1.6.0", - "uuid": "^7.0.3" + "uuid": "^7.0.3", + "sleep-promise": "^9.1.0" }, "devDependencies": { "@graphql-codegen/cli": "^1.21.4", diff --git a/tests/network-tests/src/flows/content/activeVideoCounters.ts b/tests/network-tests/src/flows/content/activeVideoCounters.ts index 262754c9e9..237f22bd33 100644 --- a/tests/network-tests/src/flows/content/activeVideoCounters.ts +++ b/tests/network-tests/src/flows/content/activeVideoCounters.ts @@ -9,6 +9,7 @@ import { } from '../../fixtures/content' import BN from 'bn.js' import { createJoystreamCli } from '../utils' +import sleep from 'sleep-promise' export default async function activeVideoCounters({ api, query, env }: FlowProps): Promise { const debug = extendDebug('flow:active-video-counters') @@ -50,6 +51,9 @@ export default async function activeVideoCounters({ api, query, env }: FlowProps await new FixtureRunner(createChannelsAndVideos).run() const { channelIds, videosData } = createChannelsAndVideos.getCreatedItems() + // Allow time for processor to process videos created + await sleep(10 * 1000) + // check that active video counters are working const activeVideoCountersFixture = new ActiveVideoCountersFixture( api, diff --git a/tests/network-tests/src/flows/content/curatorModerationActions.ts b/tests/network-tests/src/flows/content/curatorModerationActions.ts index 5a8a187f7c..b4948e80f5 100644 --- a/tests/network-tests/src/flows/content/curatorModerationActions.ts +++ b/tests/network-tests/src/flows/content/curatorModerationActions.ts @@ -25,6 +25,7 @@ import { DeleteChannelAsModeratorFixture, DeleteChannelAsModeratorParams, } from '../../fixtures/content/curatorModeration/DeleteChannelAsModerator' +import sleep from 'sleep-promise' export default async function curatorModerationActions({ api, query, env }: FlowProps): Promise { const debug = extendDebug('flow:curator-moderation-actions') @@ -108,6 +109,9 @@ export default async function curatorModerationActions({ api, query, env }: Flow const addCuratorToGroupFixture = new AddCuratorToCuratorGroupFixture(api, query, addCuratorToGroupParams) await new FixtureRunner(addCuratorToGroupFixture).run() + // Allow time for processor to process videos created + await sleep(10 * 1000) + // test curator moderation actions /**