Development
: Fix flaky ResultListenerIntegrationTest
#7326
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Checklist
General
Server
Motivation and Context
The tests in ResultListenerIntegrationTest were flaky. The tests' failed against MySQL and Postgres because of many scheduled tasks and slower database access.
Description
The tests are fixed by setting lastScheduledRun in ParticipantScoreScheduleService. Setting the value to Instant.now() prevents the ScheduleService from calculating the scores of results unrelated to this tests (Results created in prior tests). Additionally, the schedule delay has been increased to account for slower database access.
MySQL run without failing ResultListenerIntegrationTest(s):
https://github.com/ls1intum/Artemis/actions/runs/6419281166/job/17428804520?pr=7326
Postgres run without failing ResultListenerIntegrationTest(s):
https://github.com/ls1intum/Artemis/actions/runs/6419281166/job/17428804757?pr=7326
Steps for Testing
Test changes only
Review Progress
Code Review