-
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
Failure of Bug468PerformanceTest.test #715 #852
Failure of Bug468PerformanceTest.test #715 #852
Conversation
@fedejeanne could you please review the changes ? |
Test Results 617 files 617 suites 38m 54s ⏱️ For more details on these failures, see this check. Results for commit c1a6dd1. ♻️ This comment has been updated with latest results. |
@lathapatil I haven't been involved in the fix of the original issue (#468), maybe ask @jukzi / @iloveeclipse ? FWIW this PR seems reasonable since the performance problem has been fixed by #468 and the test is rather new, so adapting the timeout makes sense. I'm curious though:
One last remarkPerformance tests are always hardware-dependent so I would approach this in a different way: if possible, instead of testing the performance (i.e. the total time) I would test the performance improvement i.e. you could change the test to try and test either: If the previous approaches are not practicable then I would simply test that "the new way" produces the same result as "the old way" i.e. that all files are gone. This one wouldn't be a performance test but a "normal" test to show that nothing broke with the fix. |
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.
Thanks for working on a fix for that quite often failing test!
I only have minor comments that are mainly due to the fix conforming to the style of the existing code, while I would propose to apply some simple improvements to the code when extending it anyway.
...re.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468PerformanceTest.java
Outdated
Show resolved
Hide resolved
...re.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468PerformanceTest.java
Outdated
Show resolved
Hide resolved
...re.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468PerformanceTest.java
Outdated
Show resolved
Hide resolved
I've been thinking about it over the weekend and I found another reason not to add a performance test in this class: since this test is hardware dependent then it's bound to become obsolete over time:
This is more of a general problem with any kind of performance test though, not just this test. All in all, I would either remove this test or, if possible, rewrite as a benchmark test ("old" vs "new") |
Thanks @fedejeanne for your valuable input . I do agree with your point that asserting against a constant time might not be proper way of testing the fix. I would rather try to check if I can re write the case to check "old way of total time" > "New way of total time" |
If I see correctly, this is supposed to be a regression test for #468. This bug is about unnecessary tree traversal with |
That would be in fact my favorite option :)
|
I see.
Just to be sure: I would actually recommend neither of these options. Option "a" is a performance test, which I do not consider appropriate for the case that shall be tested here. Option "b" is still kind of a performance test and would not validate proper behavior but only validate somehow "better" behavior than some baseline (especially in terms of performance). |
I propose to merge this PR since the test is failing on MacOS very often. Still I would keep the issue open to have this performance test replaced with a functionality test as proposed in the comments. I will document / link to the according ideas posted in this PR in the issue when merging this PR. |
d2a2df8
to
c49a10e
Compare
Thanks for the input and I will be checking on replacing this with functionality test |
64e65bc
to
3ae4e05
Compare
1789871
to
12b0032
Compare
@HeikoKlare The performance test is replaced with functional test. let me know if any further code changes are required . |
ab76fe6
to
61c0e2f
Compare
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.
Thank you for updating the test @lathapatil!
From a functional perspective, the test looks good. It serves as a regression test for #468 as intended.
I have some comments with respect to code style. Please also auto-format the code as it does currently not conform to the formatter settings. In addition, I would propose that you add the test case to the PropertyManagerTest
class. Then the test case is placed next to other test cases concerning the same functionality. You can then also reuse existing functionality of that test class like a project setup for every test case and the WorkspaceTestRule
that keeps track of properly cleaning up and makes custom teardown functionality obsolete.
...ore.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468FunctionalTest.java
Outdated
Show resolved
Hide resolved
...ore.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468FunctionalTest.java
Outdated
Show resolved
Hide resolved
...ore.tests.resources/src/org/eclipse/core/tests/internal/properties/Bug468FunctionalTest.java
Outdated
Show resolved
Hide resolved
61c0e2f
to
b2a6bea
Compare
9e22e1f
to
1fc2829
Compare
0d14020
to
ac5ba23
Compare
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.
Thank you for updating the test case. In general, it looks good now. I only have some minor comments remaining. Most important of them is the test method name, which should be more meaningful than just test()
.
...core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java
Outdated
Show resolved
Hide resolved
...core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java
Outdated
Show resolved
Hide resolved
...core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java
Outdated
Show resolved
Hide resolved
...core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java
Outdated
Show resolved
Hide resolved
...core.tests.resources/src/org/eclipse/core/tests/internal/properties/PropertyManagerTest.java
Outdated
Show resolved
Hide resolved
088bfb8
to
6414cdb
Compare
6414cdb
to
e720161
Compare
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.
Test case looks good now, thank you!
Failing tests do not seem to be related to this PR. I will check again soon.
e720161
to
c884b1a
Compare
Convert performance test to functional test case. Fixes eclipse-platform#715 Review points addressed The testcase from this class is moved to PropertyManagerTest.java review points addressed review points addressed
c884b1a
to
c1a6dd1
Compare
Failing test is independent from this PR and documented in #128. |
Failure of the testcase in Mac OS only.
Fix provided as such performance time limit is increased to 75 seconds from 60 seconds only for Mac OS. The testcase took around 71 seconds for Mac OS in the build
(https://github.com/eclipse-platform/eclipse.platform/actions/runs/6263790505/job/17008968379?pr=704)
Fixes #715