Skip to content

Commit

Permalink
integration-tests: video counter and moderator action tests fail if p…
Browse files Browse the repository at this point in the history
…rocessor is behind
  • Loading branch information
mnaamani committed Jan 11, 2024
1 parent 8e88b27 commit 78c5d4d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/network-tests/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 4 additions & 0 deletions tests/network-tests/src/flows/content/activeVideoCounters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const debug = extendDebug('flow:active-video-counters')
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> {
const debug = extendDebug('flow:curator-moderation-actions')
Expand Down Expand Up @@ -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

/**
Expand Down

0 comments on commit 78c5d4d

Please sign in to comment.