Closed prmr closed 10 years ago
I'm having trouble trying to run tests on the master branch. I'm using
right-click in package explorer > Run As > JUnit Test
The problem is that most of the tests are having errors (not failing). Many errors are produced, most of them are BeanCreationException and BeanInstantiationException.
I'll just cover some of the obvious things: I did enable Gradle dependency management and refreshed my dependencies. I also made sure that my .localdatapath is correct, and that I have versions of the .json files having filenames of the form test-.json. In fact, TestDataPath is one of the two only tests that passes for me (the other being TestTypedValue).
Would anyone have any hints based on the kind of exceptions I'm getting?
Could you post a more detailed stack trace of what causes the BeanCreationException?
If there are exceptions in the bean creation, it's almost certainly the CRData constructor that's failing, and this might be because the test files can't be found. Make sure you converted the original .json files into test-.json, and not the json files that were being automatically downloaded at server startup. You should have the file test-category.json, but you shouldn't have test-categories.json.
Hey. Thanks for the clues Gabriel. I'm pretty sure that I had the right files, and I had named them as test-
I can't attach the stack trace here (they only allow image filetypes) I'll pass it on the class forum. If you do have a spare moment to have a look---I'd be most grateful!
Posted under "Technical Stuff"
This is your root exception: java.lang.OutOfMemoryError: Java heap space.
I think you were having this problem before when trying to load all the data in memory. Did you ever try increasing your heap size?
See for example solution 1 here: http://www.mkyong.com/eclipse/eclipse-java-lang-outofmemoryerror-java-heap-space/
Ah dang. Sorry you have figured that out! Yup I used that solution, but I hadn't added it to the testing run mode.
Thanks so much!
On Mon, Mar 10, 2014 at 7:45 PM, Gabriel Forgues notifications@github.comwrote:
This is your root exception: java.lang.OutOfMemoryError: Java heap space.
I think you were having this problem before when trying to load all the data in memory. Did you ever try increasing your heap size?
See for example solution 1 here: http://www.mkyong.com/eclipse/eclipse-java-lang-outofmemoryerror-java-heap-space/
Reply to this email directly or view it on GitHubhttps://github.com/prmr/Creco/issues/25#issuecomment-37248624 .
Made obsolete by #44.
Achieve at least line coverage of all the category and product processing in CR data. The tests can be added into TestCRData.