Skip to content

Conversation

@rockbmb
Copy link
Collaborator

@rockbmb rockbmb commented Nov 21, 2025

Closes #475 .

Issue contains more information.

TL;DR is that this PR makes scheduler E2E tests more robust in cases in which the forked network's scheduler's agenda contains tasks scheduled for blocks that tests themselves schedule tasks in, without having to delete those tasks.

Also, update block numbers.
@rockbmb rockbmb added this to the General CUI/CUJ Coverage milestone Nov 21, 2025
@rockbmb rockbmb self-assigned this Nov 21, 2025
@rockbmb rockbmb added enhancement New feature or request e2e tests Related to end-to-end tests labels Nov 21, 2025
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes correctly improve test robustness by handling multiple tasks in the agenda. However, the test logic is incomplete as it identifies the task but does not capture its index, which is required for the subsequent cancellation step that currently relies on a hardcoded index.

@rockbmb rockbmb marked this pull request as draft November 25, 2025 01:33
@rockbmb rockbmb marked this pull request as ready for review December 1, 2025 12:50
@rockbmb rockbmb requested a review from xlc December 1, 2025 13:01
@rockbmb
Copy link
Collaborator Author

rockbmb commented Dec 1, 2025

Ultimately led to a few more scheduler tests:

  1. scheduling a task to a full agenda fails
  2. a reschedule for a failed anonymous task to a full agenda fails
  3. same as 2., but for named tasks

With this, tests should no longer occasionally fail due to the presence of real tasks in the agenda of the block selected for a test to run on.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes improve the robustness of scheduler tests by introducing helpers to find tasks in the agenda instead of relying on fixed indices. However, there is a likely incorrect assertion in the scheduleToFullAgenda test regarding the error type returned when the agenda is full.

@rockbmb rockbmb merged commit b7a149c into master Dec 2, 2025
112 checks passed
@rockbmb rockbmb deleted the scheduler-fix branch December 2, 2025 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e tests Related to end-to-end tests enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve scheduler E2E test code

3 participants