What I have tried, removing ant-javax.jar
downgrade junit 4.11
and exluded hamcrest from cucumber junit library and junit library
Still there is some place where this dependency for mockito core exist.
I don't know how to remove this dependency.
I am pasting some section of my gradle file for you guys to see.
I have solved this, but now I am getting this error
Assertions mismatch: -ea was not specified but -Dtests.asserts=true
java.lang.Exception: Assertions mismatch: -ea was not specified but -Dtests.asserts=true
at __randomizedtesting.SeedInfo.seed([3D128401C67BEC61]:0)
at org.apache.lucene.util.TestRuleAssertionsRequired$1.evaluate(TestRuleAssertionsRequired.java:47)
at org.apache.lucene.util.TestRuleMarkFailure$1.evaluate(TestRuleMarkFailure.java:47)
at org.apache.lucene.util.TestRuleIgnoreAfterMaxFailures$1.evaluate(TestRuleIgnoreAfterMaxFailures.java:64)
at org.apache.lucene.util.TestRuleIgnoreTestSuites$1.evaluate(TestRuleIgnoreTestSuites.java:54)
at com.carrotsearch.randomizedtesting.rules.StatementAdapter.evaluate(StatementAdapter.java:36)
at com.carrotsearch.randomizedtesting.ThreadLeakControl$StatementRunner.run(ThreadLeakControl.java:368)
at java.lang.Thread.run(Thread.java:748)
Test ignored.
REPRODUCE WITH: gradle null -Dtests.seed=3D128401C67BEC61 -Dtests.class=com.tesco.productservice.elasticsearch.ElasticsearchClientTestMethods -Dtests.locale=en-US -Dtests.timezone=Asia/Kolkata
NOTE: Mac OS X 10.12.6 x86_64/Oracle Corporation 1.8.0_151 (64-bit)/cpus=8,threads=1,free=189928872,total=257425408
NOTE: All tests run in this JVM: [ElasticsearchClientTestMethods]
Disconnected from the target VM, address: '127.0.0.1:52379', transport: 'socket'
Exception in thread "Thread-1" java.lang.ClassCastException: org.apache.logging.slf4j.SLF4JLoggerContext cannot be cast to org.apache.logging.log4j.core.LoggerContext
at org.elasticsearch.test.ESTestCase.lambda$static$0(ESTestCase.java:186)
at java.lang.Thread.run(Thread.java:748)
Suppressed: java.security.AccessControlException: access denied ("org.elasticsearch.ThreadPermission" "modifyArbitraryThreadGroup")
at java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
at java.security.AccessController.checkPermission(AccessController.java:884)
at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
at org.elasticsearch.SecureSM.checkThreadGroupAccess(SecureSM.java:196)
at org.elasticsearch.SecureSM.checkAccess(SecureSM.java:143)
at java.lang.ThreadGroup.checkAccess(ThreadGroup.java:315)
at java.lang.ThreadGroup.getParent(ThreadGroup.java:167)
at com.carrotsearch.randomizedtesting.RandomizedContext.context(RandomizedContext.java:240)
at com.carrotsearch.randomizedtesting.RandomizedContext.current(RandomizedContext.java:134)
at com.carrotsearch.randomizedtesting.RandomizedRunner.augmentStackTrace(RandomizedRunner.java:1848)
at com.carrotsearch.randomizedtesting.RunnerThreadGroup.uncaughtException(RunnerThreadGroup.java:20)
at java.lang.Thread.dispatchUncaughtException(Thread.java:1959)
This is the gradle task to run tests
For that I thought of specifying
jvmArgs '-ea'
How to run test in intellij so that they dont give the error.
I have also tried adding -ea in VM Options of Junit in Run->Edit Configurations. Still the same error.
PS: pardon me, I also don't understand the repository fully as I am new to it and had been assigned to do some work on it.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.