Skip to content

Introduce SchedulerBackend to fix VelocitySchedulerTest intermittent failure#1728

Merged
astei merged 1 commit intoPaperMC:dev/3.0.0from
WouterGritter:fix-velocityschedulertest
Feb 11, 2026
Merged

Introduce SchedulerBackend to fix VelocitySchedulerTest intermittent failure#1728
astei merged 1 commit intoPaperMC:dev/3.0.0from
WouterGritter:fix-velocityschedulertest

Conversation

@WouterGritter
Copy link
Contributor

As the title says.

I was having intermittent failures because of these tests when building a Velocity fork on GitHub actions.

The culprit was already identified when the tests were first written:

// TODO: The timings here will be inaccurate on slow systems.

Note that DeterministicSchedulerBackend was written partially with the help of an LLM.

@Warriorrrr
Copy link
Member

Do you have any link to a workflow run that failed because of this? Velocity uses github actions too and does not have this issue.

@electronicboy
Copy link
Member

I think I managed to make it fail once when my system was on fire, having time based tests is often a bit of a nightmare, having testing envs work differently to real environments is also a bit of a wildcard too

Copy link
Contributor

@astei astei left a comment

Choose a reason for hiding this comment

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

This seems fine to me - making the scheduler totally deterministic is the canonical solution to the problem, I just didn't have an incentive to deal with it.

FWIW, I would expect those tests to be most flaky on lower-end hardware and the last time I touched this, it was mostly to improve reliability but not all of it was made deterministic.

@astei astei merged commit c2fd3c0 into PaperMC:dev/3.0.0 Feb 11, 2026
1 check passed
@WouterGritter
Copy link
Contributor Author

For reference, a failed job before this merge: https://github.com/GemstoneGG/Velocity-CTD/actions/runs/21911993248/job/63268303163

But again, this build is for a velocity fork (though it didn't make any meaningful change to the scheduler).

pull bot pushed a commit to WiIIiam278/Velocity that referenced this pull request Feb 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants