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

Development: Fix flaky ExerciseScoresChartIntegrationTest #7319

Merged

Conversation

DominikRemo
Copy link
Contributor

@DominikRemo DominikRemo commented Oct 4, 2023

Checklist

General

Server

Motivation and Context

The test in ExerciseScoresChartIntegrationTest was flaky. The test's setup method contains multiple awaits that regularly timed out for MySQL and Postgres because of many scheduled tasks and slower database access.

Description

The test is 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).

MySQL run without failing ExerciseScoresChartIntegrationTest:
https://github.com/ls1intum/Artemis/actions/runs/6407425948/job/17394178642

Postgres run without failing ExerciseScoresChartIntegrationTest:
https://github.com/ls1intum/Artemis/actions/runs/6407425948/job/17424739364 (Test succeeded before job was canceled [see logs])

Steps for Testing

Test changes only

Review Progress

Code Review

  • Code Review 1
  • Code Review 2

@DominikRemo DominikRemo marked this pull request as ready for review October 5, 2023 11:04
@DominikRemo DominikRemo requested a review from a team as a code owner October 5, 2023 11:04
@DominikRemo DominikRemo requested a review from laadvo October 5, 2023 11:05
Copy link
Contributor

@laadvo laadvo left a comment

Choose a reason for hiding this comment

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

Tests now succeed against mysql and postgres, nice fix 👍

@Strohgelaender
Copy link
Contributor

lgtm

Would it make sense to merge this and the other PRs with similar fixes into one PR? This would make it easier to check the MySQL-build status and verify that all these tests now work.

@DominikRemo DominikRemo added this to the 6.5.5 milestone Oct 5, 2023
@krusche krusche merged commit 17b1f6b into develop Oct 7, 2023
25 of 30 checks passed
@krusche krusche deleted the development/fix-flaky-ExerciseScoresChartIntegrationTest branch October 7, 2023 15:45
@krusche krusche modified the milestones: 6.5.5, 6.6.0 Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants