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

Cleanup tests #3672

Merged
merged 3 commits into from
Oct 16, 2024
Merged

Cleanup tests #3672

merged 3 commits into from
Oct 16, 2024

Conversation

bmarty
Copy link
Member

@bmarty bmarty commented Oct 14, 2024

Remove runBlocking usage in LambdaRecorder.
Protect usage of logoutUseCase.
Let FakeKnockRoom and FakeLogoutUseCase use simulateLongTask, to catch more states.

@bmarty bmarty added the PR-Misc For other changes label Oct 14, 2024
Copy link
Contributor

github-actions bot commented Oct 14, 2024

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/4aLg72

Copy link

codecov bot commented Oct 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.81%. Comparing base (0562b2f) to head (2695513).
Report is 5 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #3672   +/-   ##
========================================
  Coverage    82.81%   82.81%           
========================================
  Files         1748     1748           
  Lines        41777    41778    +1     
  Branches      5108     5108           
========================================
+ Hits         34597    34598    +1     
  Misses        5365     5365           
  Partials      1815     1815           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Base automatically changed from feature/bma/asyncActionConfirmingWithParam to develop October 15, 2024 10:28
@bmarty bmarty marked this pull request as ready for review October 16, 2024 08:05
@bmarty bmarty requested a review from a team as a code owner October 16, 2024 08:05
@bmarty bmarty requested review from jmartinesp and removed request for a team October 16, 2024 08:05
Copy link

sonarcloud bot commented Oct 16, 2024

Copy link
Member

@jmartinesp jmartinesp left a comment

Choose a reason for hiding this comment

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

LGTM, thanks! I knew there must be a better alternative to the runBlocking usage, but it never occurred to me simulateLongTask would help here.

@bmarty bmarty merged commit 44eb58c into develop Oct 16, 2024
26 checks passed
@bmarty bmarty deleted the bma/cleanupTests branch October 16, 2024 09:15
@jmartinesp
Copy link
Member

jmartinesp commented Oct 17, 2024

I think this causes flaky tests now 🫤 : https://github.com/element-hq/element-x-android/actions/runs/11373130975/job/31639020847?pr=3697

expected to be false
	at app//io.element.android.features.preferences.impl.developer.DeveloperSettingsPresenterTest$present - toggling simplified sliding sync changes the preferences and logs out the user$1$2.invokeSuspend(DeveloperSettingsPresenterTest.kt:177)
	at app//kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	...

@bmarty
Copy link
Member Author

bmarty commented Oct 18, 2024

:/. The delay(2) is far from ideal. Let's see if I can find something better.

@bmarty
Copy link
Member Author

bmarty commented Oct 21, 2024

@jmartinesp #3717 should fix flaky test 🤞

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-Misc For other changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants