Help with error - broken test input

Hello

I am working on a project that extract the existed fault in other project, in this case i am working with Elasticsearch. Basically, we got the reversions that flagged as bug and compile the source and the tests then run the tests for each reversion. This process is apply for reversion that has the bug and the reversion after the bug was fixed. I am explain that just for information.

The problem is that I am getting some error during running the test and I am not sure whether I did something wrong or not, the error

 broken test input org.apache.lucene.queries.BlendedTermQueryTestjava.lang.Exception: Assertions mismatch: -ea was not specified but -Dtests.asserts=true
at __randomizedtesting.SeedInfo.seed([73C09399C7B7F792]:0)
at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:48)
at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
 com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:365)
at java.lang.Thread.run(Thread.java:748) 



 broken test input org.elasticsearch.cluster.routing.allocation.BalanceUnbalancedClusterTestjava.lang.Exception: Assertions mismatch: -ea was not specified but -Dtests.asserts=true
at __randomizedtesting.SeedInfo.seed([3882E2F407EDE867]:0)
at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:48)
at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:48)
at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:65)
at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:55)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at 
 com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:365)
at java.lang.Thread.run(Thread.java:748)

they are not the only errors but all of them kind of similar.
am I missing something ?
Thank you for any help.

Run your tests with -ea jvm option.

Thank you for replaying
I am using ant to build the build file, and using the command

        <exec dir="${basedir}" executable="/bin/bash">			
			<arg value="mvn"/>
			<arg value="compile"/>
		</exec>

		<exec dir="${basedir}" executable="/bin/bash">			
			<arg value="mvn"/>
			<arg value="test-compile"/>
		</exec>

for compilation.
Could you please explain more about how to use this option?

Ant to run Maven? First time I'm seeing that. I've seen it the other way around but not that way.

Anyway. It's a maven question. May be this can help: http://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#argLine

Something like:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>2.9</version>
    <configuration>
        <argLine>-ea</argLine>
    </configuration>
</plugin>

Or this https://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#compilerArgs

Thank you so much for the help.

This is not first time using Ant to run Maven, it is working fine, except that error that I have gotten now.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.