test { if(project.hasProperty("test.forkEvery")){ println "Setting the tests to fork every ${project.getProperty("test.forkEvery")} for project ${project.name}" forkEvery = project.getProperty("test.forkEvery") } }
Through simple observation I knew the tests were completing too fast. No errors, but something was off. I hard coded the value to 1 (not quoted), and that worked fine. Hmmmm. Considering Groovy would print 1000 for this:
def l = 1L; l = "1000"; println l;I had to assume something must be happening with type conversion, and Gradle is not giving me an error for it. The fix was Long.parseLong:
test { if(project.hasProperty("test.forkEvery")){ println "Setting the tests to fork every ${project.getProperty("test.forkEvery")} for project ${project.name}" forkEvery = Long.parseLong(project.getProperty("test.forkEvery")) } }
No comments:
Post a Comment