Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix active video counter and moderator action tests frequent failure #5037

Merged
merged 1 commit into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading