-
Notifications
You must be signed in to change notification settings - Fork 104
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
Random failing of TestBug297635 #460
Comments
Merge the 2 test methods in the class into 1 since they depend on each other anyway. Extract private methods to improve readability.
Merge both test methods in the class into 1 since they depende on each other anyway. Extract private methods to improve readability.
Merge both test methods in the class into 1 since they depend on each other anyway. Extract private methods to improve readability. Rethrow exceptions (they let the test fail anyway).
Merge both test methods in the class into 1 and let the class extend directly from ResourceTest. Extract private methods to improve readability. Rethrow exceptions (they let the test fail anyway).
Merge both test methods in the class into 1 and let the class extend directly from ResourceTest. Extract private methods to improve readability. Rethrow exceptions (they let the test fail anyway).
Merge both test methods in the class into 1 and let the class extend directly from ResourceTest. Extract private methods to improve readability. Rethrow exceptions (they let the test fail anyway).
Merge both test methods in the class into 1 and let the class extend directly from ResourceTest. Extract private methods to improve readability. Rethrow exceptions (they let the test fail anyway).
The failing test was obviously not (properly) fixed by #465, as it still fails randomly: |
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
Disable the automatic snapshots while running tests in TestBug297635 to avoid random failures. Fixes eclipse-platform#460
In my opinion, the real issue with this test is that is in an overall bad state. It validates internal states using reflection, even though that is not what the test is supposed to test. What the test is actually supposed to do (according to the bug it is a regression test for) is to ensure that saving snapshots clears the save state trees (by calling So in my opinion a proper test for the bug would look much easier:
Everything else (whether internal states are properly cleared by the |
…-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.
…-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.
…-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.
…-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.
…-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.
…-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.
…-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.
…-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.
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 #460.
The test
TestBug297635.test2
fails randomly.One such failures can be seen in https://github.com/eclipse-platform/eclipse.platform/actions/runs/4991112285/jobs/8937471805.
Here's the stack trace:
The text was updated successfully, but these errors were encountered: