Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Error messages in
testFailure
is very bad: it doesn't tell what failed and why.Needs random tests to prevent stuff like this: https://www.codewars.com/kata/reviews/54e79c727272425b8b000152/groups/5ca979cab447740001231cea
Hi (I'm the kata author), I had the same issue when I tried to submit my reference solution in 'Train' mode, however there was no error when I submitted the reference solution in kata creation mode. I ended up setting the package
org.codewars.kata.dynamicjava
for all of the kata classes (test class, solution, and user test class) as well as all of the test cases which seems to have fixed the problem. Try setting that package for your solution and see if you still get that error.Yeah I tried submitting my solution in 'Train' mode and had the same issue (no issue when validating in kata creation mode). I ended up setting a package for all of the classes (test classes and initial code template) which seems to have fixed the issue. Try setting the package
org.codewars.kata.dynamicjava
for your solution and custom tests and see if that fixes it.I changed all of the package names in the code to be compiled in the test cases to
org.codewars.kata.dynamicjava
as well but playing around a bit with the custom test cases in 'Train' mode no matter what I tried setting the package names to in the code to be compiled it didn't seem to cause any errors. I think the problem only occurs if the test class or solution class uses the default package and you try to load a class with a non-default package name. And this problem only seems to occur in 'Train' mode.Yeah seems to be something with CodeWars. If I put a package on the unit tests it gets 'stuck' in that package even after removing it.
For some reason for submitting, if the solution is not in a package it returns;
And when in the package it returns
Giving an empty class also has the submit report the /my/project path for CompilerTest, seems it's stuck running the test cases out of a different directory.
Edit: It seems the package stickign only occurs on this kata for me. Tried on another with putting the test cases into a package and all was fine after removing it.
There was another comment on the forum about this kata and someone else having the same issue.
The
CompilerTest
class does not have a package specified. Themy.project
package however is used for all of the classes that the test cases try to compile. So for example you might get a call likePerhaps that is related to the problem you are experincing? Or perhaps there is some issue with the CodeWars website because my reference solution works without those errors.
Looks like the solution test cases are setup with a package name which doesn't allow submiting of the solution;
/my/project/CompilerTest.java:14: error: cannot find symbol
Class testClass = DynamicCompiler.compileAndLoad(name,
^
symbol: variable DynamicCompiler
location: class CompilerTest
/my/project/CompilerTest.java:31: error: cannot find symbol
Very cool. Just trick the test into believing that there are multiple threads... ;-)