Closed JamesIry closed 12 years ago
Turning off parallel testing fixes that right up. So naturally it looks like a race condition.
But it's not clear where said race condition could be. Or why it's 100% reliable on the two versions of Linux I've been running it on so far.
In desperation I made the two Regexen in Tokenizer non-static but that didn't solve the problem. They're documented as being non-stateful and I've never had problems with sharing them across threads in the past so I'm not surprised. Other than that I'm stumped.
For now I'm commenting out the config to run tests in parallel. https://github.com/JamesIry/JADT/commit/6b02311c5527048038d1224a6818f9c93dfca0e0 But I'm leaving the bug as open because I don't understand what the problem is.
An even better solution https://github.com/JamesIry/JADT/commit/3896027a0102ded5b92470b2fe494ddaed9fffb0
mvn test is failing approximately 75% of the time on my mac, but not all the time. It has never failed on two other Linux machines. ParserTest#testFull gives an exception from the Parser saying it was expected a "=" but found "hello.world".
The workaround is to not run tests in parallel. But that's not a fix until I understand what the root problem is.
Steps to reproduce: