-
Notifications
You must be signed in to change notification settings - Fork 26
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
Room Manager Tests #341
Room Manager Tests #341
Conversation
Kaspar-Metsa
commented
Feb 3, 2024
•
edited
Loading
edited
- Tests for Room Manager
- Fixed sometimes failing test in Timer
- Fixed Warning message during build
ba2cd05
to
ab2b9ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this, looks good overall. My high level feedback is to add a bit more context/readability and test more end to end (like test that the overall widget works across mutations).
tests/TestCTimers.cpp
Outdated
@@ -76,8 +76,6 @@ void TestCTimers::testCountdownCompletion() | |||
timers.addCountdown(countdownName.toStdString(), countdownDesc.toStdString(), countdownTimeMs); | |||
QString countdownsListBefore = QString::fromStdString(timers.getCountdowns()); | |||
QVERIFY(countdownsListBefore.contains(countdownName)); // Verify the added countdown is present | |||
QString countdownsList = QString::fromStdString(timers.getCountdowns()); | |||
QVERIFY(countdownsList.contains("(up for - 0:00, left - 0:10)")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove? Not arguing just looking for a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This QVERIFY failed around than 10% of runs. I don't know why. Maybe sometimes it takes a millisecond or so to see the string in the list? So waiting a bit would fix it but I do not want to use QWAIT in tests because currently our tests take 4.4sec and using qwait a lot will make tests slow. I have tried mocking the clock but since this timer is based on real system clock it is not possible to mock, the actual implementation should also be changed to a mockable clock.
What do you suggest to do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you saying it failed in 10% of your runs locally or 10% of GH runs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sometimes failed on the server, on GH
Looks like there is a Mingw build failure too: https://ci.appveyor.com/project/nschimme/mmapper/builds/49106518/job/l2au3mr81nbyrcxi#L574
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #341 +/- ##
==========================================
+ Coverage 51.86% 53.66% +1.79%
==========================================
Files 80 89 +9
Lines 5202 5281 +79
Branches 0 460 +460
==========================================
+ Hits 2698 2834 +136
+ Misses 2504 2447 -57 ☔ View full report in Codecov by Sentry. |
Fixed! |
731e1d8
to
f72fb6f
Compare
5eb7bbc
to
a53f3d6
Compare