numenta/htm.java

Test case failures under Windows

jamesweakley opened this issue · 0 comments

Issues reported here: https://discourse.numenta.org/t/gradle-build-failed/2724/3

Based on my execution results there are a couple of different non-critical causes.

The first is to do with how file deletions are handled by the JVM in Windows. The HTMNetworkTests directory is being deleted at the end of some tests and then created again by another test, but in reality the previous one hasn’t completed yet and there is still an open handle, this causes IOExceptions. You’ll notice that if you run the failed test(s) in isolation, they will pass.

The issue in testMain is that \n is used as a line separator when streaming out, then the test asserts that this resulted in a new line. Replacing “\n” with System.lineSeparator() is the cross platform fix, as it will retain “\n” in mac/linux and use “\r\n” in Windows.