-
Notifications
You must be signed in to change notification settings - Fork 115
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
Fix test for save state cleanup on snapshot save / bug 297635 #460 #737
Conversation
Test Results 36 files - 6 36 suites - 6 48m 57s ⏱️ - 6m 4s Results for commit 7afdb42. ± Comparison against base commit 0b0eff5. This pull request removes 1036 and adds 1 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
...eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java
Outdated
Show resolved
Hide resolved
...eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java
Outdated
Show resolved
Hide resolved
...lipse.core.tests.resources/src/org/eclipse/core/tests/resources/session/AllSessionTests.java
Outdated
Show resolved
Hide resolved
...eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java
Outdated
Show resolved
Hide resolved
69978f2
to
f9a5b76
Compare
...eclipse.core.tests.resources/src/org/eclipse/core/tests/resources/regression/Bug_297635.java
Outdated
Show resolved
Hide resolved
19dbe22
to
cd75c85
Compare
Looks good :-) |
…-platform#460 The existing test TestBug297635 relies on reflection to test some internal state change of the SavedState class that saves temporary states until some save operation. The test was prone to fail because it relied on internal state changes that depend an specific overall system state (e.g., have an unsaved workspace state, so that no concurrent automatic snapshot save is allowed to occur during test execution). It used reflection to access an internal, highly volatile state. The bug for which the test case serves as a regression test was due to missing cleanup triggered by SavedState.forgetSavedTree(). Instead of checking for internal state changes performed by the cleanup, the rewritten test only checks for a call of the according method. To this end, it temporarily inserts a spy on the SaveManager. Since a Workspace and SaveManager are not easy to set up in an isolated way for testing purposes, the test still relies on reflection, but only to inject a spy on the SaveManager rather than to validate internal states. Since the test is not required to be run as a session test anymore, it is moved to the ordinary regression resource tests. Fixes eclipse-platform#460.
Failing test is unrelated and documented in #744. In addition, checks are only failing because of an API tooling issue, see eclipse-pde/eclipse.pde#782. |
The existing test
TestBug297635
relies on reflection to test some internal state change of theSavedState
class that saves temporary states until some save operation. The test was prone to fail because it relied on internal state changes that depend an specific overall system state (e.g., have an unsaved workspace state, so that no concurrent automatic snapshot save is allowed to occur during test execution). It used reflection to access an internal, highly volatile state.The bug for which the test case serves as a regression test was due to missing cleanup triggered by
SavedState.forgetSavedTree()
. Instead of checking for internal state changes performed by the cleanup, the rewritten test only checks for a call of the according method. To this end, it temporarily inserts a spy on theSaveManager
. Since aWorkspace
andSaveManager
are not easy to set up in an isolated way for testing purposes, the test still relies on reflection, but only to inject a spy on theSaveManager
rather than to validate internal states.Since the test is not required to be run as a session test anymore, it is moved to the ordinary regression resource tests.
Fixes #460.