# Help with error - broken test input

**URL:** <https://discuss.elastic.co/t/help-with-error-broken-test-input/95025>\
**Category:** Elasticsearch\
**Created:** [July 29, 2017, 12:20am UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025 "2017-07-29T00:20:03Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hukh](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@hukh](https://discuss.elastic.co/u/hukh)\
**Post date:** [July 29, 2017, 12:20am UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/1 "2017-07-29T00:20:04Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 29, 2017, 1:12am UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/2 "2017-07-29T01:12:35Z")

</div>

Run your tests with -ea jvm option.

---

<div class="post-metadata">

**Author:** ![hukh](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@hukh](https://discuss.elastic.co/u/hukh)\
**Post date:** [July 29, 2017, 2:02am UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/3 "2017-07-29T02:02:23Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [July 29, 2017, 5:56am UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/4 "2017-07-29T05:56:02Z")

</div>

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](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](https://maven.apache.org/plugins/maven-compiler-plugin/testCompile-mojo.html#compilerArgs)

---

<div class="post-metadata">

**Author:** ![hukh](https://avatars.discourse-cdn.com/v4/letter/h/f05b48/32.png) [@hukh](https://discuss.elastic.co/u/hukh)\
**Post date:** [July 29, 2017, 4:13pm UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/5 "2017-07-29T16:13:51Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 26, 2017, 4:13pm UTC](https://discuss.elastic.co/t/help-with-error-broken-test-input/95025/6 "2017-08-26T16:13:57Z")

</div>

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