-
Notifications
You must be signed in to change notification settings - Fork 215
Try to stabilize flacky PartRenderingEngineTest #3063
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
Conversation
This issue can hardly be reproduced locally, so I'll keep it as a draft for now and will periodically rebase it, to see whether the failure still occurs. The general problem is clear, I think, and the question is only how much one has to wait between the test steps. |
This pull request changes some projects for the first time in this development cycle.
An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch. Git patch
Further information are available in Common Build Issues - Missing version increments. |
Test Results 2 778 files ±0 2 778 suites ±0 1h 39m 50s ⏱️ + 2m 22s For more details on these failures, see this check. Results for commit 98eb320. ± Comparison against base commit 51c4ffc. ♻️ This comment has been updated with latest results. |
@@ -2468,6 +2468,7 @@ public void ensureCleanUpAddonCleansUp() { | |||
|
|||
assertTrue(" PartStack with children should be rendered", partStackForPartBPartC.isToBeRendered()); | |||
partService.hidePart(partB); | |||
contextRule.spinEventLoop(); | |||
partService.hidePart(partC); | |||
contextRule.spinEventLoop(); | |||
assertFalse( |
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.
Instead one can consider to have a loop here that for example checks for a maximum of 10 seconds if the condition is meet and if not spins the event loop. I have did this on other places in a similar way.
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.
I first wanted to see if this is sufficient, but I was also already playing with the idea of creating a new spinEventLoop(int method)
, if this is still too unreliable:
public void spinEventLoop(int time) {
long start = System.currentTimeMillis();
do {
while (Display.getCurrent().readAndDispatch()) {
Thread.yield();
}
} while (System.currentTimeMillis() - start < time);
}
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.
False alarm: It's not a timing issue, the test is simply bugged. "partC" is missing the REMOVE_ON_HIDE_TAG
, so it's never removed from the part stack.
Due to an oversight, the REMOVE_ON_HIDE tag is set on "partB" twice, as opposed to "partB" and "partC". This may occasionally keep the part stack rendered, because "partC" is not removed from the model when hidden. Closes eclipse-platform#751
For the sake of documentation: |
Using partC looks right. |
Test failure is unrelated: #1517 |
Due to an oversight, the REMOVE_ON_HIDE tag is set on "partB" twice, as opposed to "partB" and "partC". This may occasionally keep the part stack rendered, because "partC" is not removed from the model when hidden.
Closes #751