-
Notifications
You must be signed in to change notification settings - Fork 874
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
Attempt to repair PartialReparseTest #7823
Conversation
first CI run failed again (4th attempt did work) new discoveries:
Might be worth taking a closer look at it. |
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.
Looks reasonable to me. Thanks for stabilizing the test. For the record, I've ran the test locally 200 times this morning, and it never failed for me.
@lahodaj did you run the original version or with this PR applied? Since to me it did also fail significantly less often locally than on CI. But since switching away from memory FS, there were no failures anymore, not locally and not on CI (100 runs). |
I was running the original version. |
we can likely exclude memory fs specific modification time resolution issues since I changed the impl to:
this didn't help. So it is probably safe to exclude the memory fs impl itself being the problem - whats left is the |
Test has a fairly high failure rate, investigation showed that it had multiple issues. Fixing those does seem to improve stability, however, likely does not fix the underlying race condition. With the changes applied, 1 out of of 50 local runs failed. But what is more important: the test is hopefully working correctly now issues fixed: 'code.replaceFirst("^", "")' was used by accident. This method expects regexps and won't have the desired effect. This essentially means that the first parsing run had always javac errors since the test code contained '^' characters. The second parsing run, which did replace the injected snippet had and off-by-one copy/paste mistake in one of the doRun methods. But since the first run was already wrong, the result of reparse run didn't really matter since both were compared - that is also why the missing semicolon wasn't noticed in testAnonymousFullReparse2() or the double escaped newline character in testAnonymous(). other: - more asserts added to exclude potential document update issues - enabled a previously disabled test case
- testing showed that using a real filesystem (or not using mem fs) resolves the sporadic failures entirely. Unfortunately it is not clear what the cause for the failures is. (see PR discussion) - move test source files into folder matching the declared package
5b18e7e
to
b8d43a3
Compare
updated the commit message of the last commit. I did also move the test files into their Thanks for review, planning to merge once green. |
PartialReparseTest
has a fairly high failure rate (a recent merge required 7 restarts).Investigation showed that it had multiple issues. Fixing those does seem
to improve stability, however, likely does not fix the underlying race condition.
With the changes applied, 1 out of of 50 local runs failed.
But what is more important: the test is hopefully working correctly now
issues fixed:
code.replaceFirst("^", "")
was used by accident. This method expectsregexps and won't have the desired effect. This essentially means
that the first parsing run had always errors since the test code
contained
^
characters.The second parsing run, which did replace the injected snippet had
and off-by-one copy/paste mistake in one of the doRun methods.
But since the first run was already wrong, the result of reparse run
didn't really matter since both were compared - that is also why the
missing semicolon wasn't noticed in
testAnonymousFullReparse2()
orthe double escaped newline character in
testAnonymous()
.More asserts added to exclude potential document update issues.
Enabled a previously disabled test case.
first commit has the fixes, second switches to multi-line-string blocks