Test not passing - CliTest.scala:193
Closed this issue · 8 comments
Hi,
When I build using "./gradlew jar", I have a failing test at CliTest.scala, line 193. The full error output is:
ly.stealth.mesos.kafka.CliTest > broker_log FAILED
java.lang.AssertionError at CliTest.scala:193114 tests completed, 1 failed
:test FAILEDFAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':test'.There were failing tests. See the report at: file:///home/vagrant/kafka/out/gradle/reports/tests/index.html
Any ideas? I've tried this on java 7 and java 8.
The funny thing is, sometimes it gets past this test, but most of the time it doesn't, and I see this error.
I'm also getting the same error and not able to create the jar.
I just did a build from the vagrant vm without any issues.
cd src/vagrant
vagrant up
vagrant ssh master
touch ~/.gradle/gradle.properties && echo "org.gradle.daemon=true" >> ~/.gradle/gradle.properties
cd /vagrant
./gradlew clean jar
I just ran ./gradlew clean jar and got the same issue full stack from the index.html in tests below.
broker_log is what is failing for me based on the tests package. Could part of the problem be trying to build this on a node already running Mesos? Others who see the failure, are you running it in a clean build env or on box running Mesos? Joe, what happens when you build without Vagrant per the readme... thanks!
java.lang.AssertionError:
at org.junit.Assert.fail(Assert.java:88)
at ly.stealth.mesos.kafka.CliTest.broker_log(CliTest.scala:193)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:745)
This is the block of code where the failure is. I tried upping the timeout to 10 seconds, it just took longer to fail. I regret that I am a little about my coding skill here on what the test is trying to do and how it' failing.
setLogContent("something")
// retrieve log only for active and running broker
broker.task.state = RUNNING
try { exec("broker log 0 --timeout 1s") }
catch { case e: Cli.Error => fail("") }
With the sun.reflect stuff, would OpenJDK vs OracleJDK make a difference in tests?
Any workaround this problem? It is also failing for me. I installed the mesos-0.27 on the machine where I am doing the build.
I've been building with -x test It's a hacky work around (It doesn't do the tests) but thus far it's been working for me built that way. I don't like it, but it works.
+1, also reproducing for me locally - 3 out of 3 times.
LMK if you have a patch to verify or something - maybe I could help here to verify your fix.
------------------------------------------------------------
Gradle 2.12
------------------------------------------------------------
Build time: 2016-03-14 08:32:03 UTC
Build number: none
Revision: b29fbb64ad6b068cb3f05f7e40dc670472129bc0
Groovy: 2.4.4
Ant: Apache Ant(TM) version 1.9.3 compiled on December 23 2013
JVM: 1.8.0_74 (Oracle Corporation 25.74-b02)
OS: Linux 3.16.0-41-generic amd64