-
Notifications
You must be signed in to change notification settings - Fork 219
Use TestUtil.cleanUp across the tests #3029
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 ensures that the tests don't leak jobs that are only detected by a subsequent test. - Use editor.close(false) rather than editor.dispose() to clean up the thread/job properly. eclipse-platform#3025
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. |
In some cases it might be more convenient to create for JUnit-4 tests a corresponding TestRule or for JUnit-5 a corresponding Extension. which is then for example used at: We also already have custom JUnit-5 extension here, but I don't remember from the top of my head where. |
Yes, this seemed ugly and repetitive. But I'm not at JUnit expert though even to my eye it seemed there must be a better way. |
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It still need to be applied to the test TODO: Apply this to test
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It still need to be applied to the test TODO: Apply this to test
Rule created #3031 here, let me know if you like that, if something thinks that is a good approach, I can modify the tests to use this rule. |
I like it in principle a lot. I would expect that it should simplify something by virtue of deleting something. Thanks 🙏 in advance for improving this. |
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It still need to be applied to the test TODO: Apply this to test
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It is applied to the tests. TestRule is still necessary, as some tests spin the event loop or wait for jobs using it. Some tearDown methods did also spin the event loop, that is not necessary as the rule does this already.
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It is applied to the tests. TestRule is still necessary, as some tests spin the event loop or wait for jobs using it. Some tearDown methods did also spin the event loop, that is not necessary as the rule does this already.
In eclipse-platform#3029 it was suggested to add a rule, this is the rule. It is applied to the tests. Some tearDown methods did also spin the event loop, that is not necessary as the rule does this already.
#3025