Mir

Merge lp://qastaging/~afrantzis/mir/fix-1335819-surface-destruction-after-teardown into lp://qastaging/mir

Proposed by Alexandros Frantzis
Status: Rejected
Rejected by: Cemil Azizoglu
Proposed branch: lp://qastaging/~afrantzis/mir/fix-1335819-surface-destruction-after-teardown
Merge into: lp://qastaging/mir
Diff against target: 50 lines (+9/-4)
1 file modified
tests/acceptance-tests/test_client_surface_events.cpp (+9/-4)
To merge this branch: bzr merge lp://qastaging/~afrantzis/mir/fix-1335819-surface-destruction-after-teardown
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alberto Aguirre (community) Abstain
Alan Griffiths Needs Information
Review via email: mp+224981@code.qastaging.launchpad.net

Commit message

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

The server is torn down during TearDown() but we keep a surface alive after that and try to destroy it when destroying the test fixture, leading to occasional crashes.

Description of the change

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

The server is torn down during TearDown() but we keep a surface alive after that and try to destroy it when destroying the test fixture, leading to occasional crashes.

It is debatable whether we should handle this case more gracefully in the server itself.

This solution is slightly more complicated than the alternative of reset()-ing the surface on TearDown(), but I think it communicates our intent to access (if possible) but not own the surface, and is the least intrusive in terms of how it affects object lifetimes.

To post a comment you must log in.
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

*Needs Discussion*

I prefer to explicitly release the surface we grab in SetUp() in TearDown() rather than rely on its lifetime which is being controlled elsewhere (in the server implementation).

C.f. https://code.launchpad.net/~alan-griffiths/mir/fix-1335819/+merge/224983

review: Needs Information
Revision history for this message
Alberto Aguirre (albaguirre) wrote :

I'm going with the Alan's proposal.

review: Abstain
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Unmerged revisions

1732. By Alexandros Frantzis

tests: Don't keep surfaces alive and try to destroy them after the server has been torn down

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches