-
Notifications
You must be signed in to change notification settings - Fork 865
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
tests in module java.refactoring are excessively slow #8160
Comments
I just found that some of the test methods are excessively long and have multiple unrelated asserts. |
The brittleness of the tests appears to depend on the formatting of the expected code. |
Does anyone know where I can find old issue numbers? It's probably in some old tracking system. Is that still available? If so, it might be useful to add the issue description to the tests |
Switching from The old issue numbers might be from the old bugzilla instance, which should be archived here: https://bz.apache.org/netbeans/. They also might be from the Apache Jira instance https://issues.apache.org/jira/ (NETBEANS-.... is a good indicator, that these are from JIRA). Refactorings outside bugfixing should have a very good reason. Review time is already limited, review without real benefit (yes I know that is discussable) gives little incentive. |
I will investigate the stability. Anyway, in the current setup, a failing test without On the other hand: some of the flakiness appears to depend on badly formatted input and output. Maybe it's time someone invested some time in test stability. That should have a high priority. I and willing to put in my two cents. |
performance and test reliability are two distinct issues tests have often to wait for scanning to finish to get information about the changed code. Some might require the scan result itself, others might have to simply wait for the lucene index to finish writing before the workdir can be cleared for the next step. removing |
Description
The first test in each test class takes 18.000 milliseconds on average.
With 31 test classes in the
org.netbeans.modules.refactoring.java.test
package alone, that is a huge waiting bill, or stated otherwise it takes my caffeine level over healthy values.Since some of these tests involve the GUI, working on other things on the same machine is unproductive, because your work will lose focus.
Use case/motivation
Run the tests in package
refactoring/netbeans/org.netbeans.modules.refactoring.java.test
and measure.NetBeans will do that for you. The last run on my machine (AMD64, 24 virtual cores, that do not help,32 Gigs of memory for me and netbeans alone).
I would replace the method
writeFilesAndWaitForScan
with one that skips the wait for scan part. The wait for scan part isdocumented as use with care, it takes a long time. From experience some, maybe a lot more can do without the full scan.
I will be waiting for approval before starting this effort.
Related issues
developing/adding features/resolve bugs. #7043, #7044
Are you willing to submit a pull request?
Yes
The text was updated successfully, but these errors were encountered: