mbien opened a new pull request, #6665: URL: https://github.com/apache/netbeans/pull/6665
The race condition strikes back! This particular php tests requires too many restarts, I can't stabilize master at all atm. So I took another look at #5658, and I believe all I did back than was to change the timing without fixing the underlying issue. My mistake was to think that [`getSource().getDocument(true)`](https://github.com/apache/netbeans/blob/0c8313ebfd62638da8933c5d6a3347fe1a8d189e/ide/parsing.api/src/org/netbeans/modules/parsing/api/Source.java#L266-L289) would hold the document internally for the next `getDocument(false)` call - but this is not the case. So all the last "fix" did was to read a document and forget about it again, the timing however helped the tests to pass. This is also annoying to debug since this usually works when the debugger is attached. So I think there are two obvious ways how to fix this: - actually cache the document in `Source.getDocument(true)` for subsequent `Source.getDocument(false)` calls, and eager load the document in the test like attempted in 5658 - or call Source.getDocument(true) in FoldingScanner (might potentially have an performance impact) PR implements currently the second option -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
