Skip to content

Commit 9c6b711

Browse files
authored
✅ Remove flaky test since we already have coverage for randomization (#4260)
1 parent e71d265 commit 9c6b711

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

packages/ozone/tests/scheduled-action-processor.test.ts

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -126,37 +126,6 @@ describe('scheduled action processor', () => {
126126
expect(executedActions.length).toBe(0)
127127
})
128128

129-
it('processes randomized scheduling actions within time window', async () => {
130-
const testSubject = sc.dids.carol
131-
132-
// Schedule an action with time range (past executeAfter, future executeUntil)
133-
const pastTime = new Date(Date.now() - 30 * MINUTE).toISOString()
134-
const futureTime = new Date(Date.now() + 30 * MINUTE).toISOString()
135-
await scheduleTestAction(testSubject, {
136-
executeAfter: pastTime,
137-
executeUntil: futureTime,
138-
})
139-
140-
// Process multiple times to account for randomization
141-
let executed = false
142-
for (let i = 0; i < 20 && !executed; i++) {
143-
await network.ozone.daemon.ctx.scheduledActionProcessor.findAndExecuteScheduledActions()
144-
const executedActions = await getScheduledActions(
145-
['executed'],
146-
[testSubject],
147-
)
148-
if (executedActions.length > 0) {
149-
executed = true
150-
expect(executedActions[0].status).toBe('executed')
151-
}
152-
}
153-
154-
// At least verify the action is eligible for processing
155-
const actions = await getScheduledActions(['pending'], [testSubject])
156-
expect(actions.length).toBe(1)
157-
expect(actions[0].randomizeExecution).toBe(true)
158-
})
159-
160129
it('skips randomized actions before executeAfter time', async () => {
161130
const testSubject = 'did:plc:future_randomized'
162131

0 commit comments

Comments
 (0)