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

Modified shutdown procedure in GUI tests #6448

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

devos50
Copy link
Contributor

@devos50 devos50 commented Oct 12, 2021

In this PR, I slightly modify the shutdown procedure in the GUI tests. I dived a bit into the shutdown procedure when I triggered a segmentation fault in Qt when using dynamic row heights for tags (by overriding the sizeHint method). This segmentation fault would trigger in ~10% of the test runs, and by investigating the (fortunately, symbolicated!) stack trace, it seems to happen when Qt tries to do a final render operation when closing the Qt application. While a more effective solution is probably out of reach for now, it seems that we can workaround this by more gracefully shutting down the components in the GUI tests. I also believe this is a more reliable approach to unload the GUI tests.

Specifically, this PR ensures that we move to the 'shutting down' screen in the GUI when the GUI tests are done (and a screenshot is also made). Then, we shutdown the core. Only when the core process is finished, we close the Qt application.

Also, by making the window fixture dependent on the tribler_api fixture, I was able to remove the tribler_api fixture declaration from the test methods.

In this PR, I slightly modify the shutdown procedure in the GUI tests. I dived a bit into the shutdown procedure when I triggered a segmentation fault in Qt when using dynamic row heights for tags (by overriding the sizeHint method). This segmentation fault would trigger in ~10% of the test runs, and by investigating the (fortunately, symbolicated!) stack trace, it seems to happen when Qt tries to do a final render operation when closing the Qt application. While a more effective solution is probably out of reach for now, it seems that we can workaround this by more gracefully shutting down the components in the GUI tests. I also believe this is a more reliable approach to unload the GUI tests.

Specifically, this PR ensures that we move to the 'shutting down' screen in the GUI when the GUI tests are done (and a screenshot is also made). Then, we shutdown the core. Only when the core process is finished, we close the Qt application.

Also, by making the `window` fixture dependent on the `tribler_api` fixture, I was able to remove the `tribler_api` fixture declaration from the test methods.
@devos50 devos50 force-pushed the change_gui_test_shutdown branch from 06b0fae to 4e8e45f Compare October 12, 2021 13:49
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@devos50 devos50 marked this pull request as ready for review October 12, 2021 13:56
@devos50 devos50 requested review from a team and xoriole and removed request for a team October 12, 2021 13:56
@ichorid ichorid merged commit 6c9d19a into Tribler:main Oct 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants