Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

randomizedtesting jar versions mismatch #8450

Closed
astefan opened this issue Nov 12, 2014 · 2 comments
Closed

randomizedtesting jar versions mismatch #8450

astefan opened this issue Nov 12, 2014 · 2 comments
Assignees
Labels
>docs General docs changes >test Issues or PRs that are addressing/adding tests v1.4.2 v1.5.0 v2.0.0-beta1

Comments

@astefan
Copy link
Contributor

astefan commented Nov 12, 2014

Following documentation section here (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/using-elasticsearch-test-classes.html) and running a simple test case results in the following exception:

java.lang.NoSuchMethodError: com.carrotsearch.randomizedtesting.RandomizedContext.runWithPrivateRandomness(Lcom/carrotsearch/randomizedtesting/Randomness;Ljava/util/concurrent/Callable;)Ljava/lang/Object;
    at __randomizedtesting.SeedInfo.seed([AEC9FCD0DC412E76:F00D66F28CD590AC]:0)
    at org.elasticsearch.test.ElasticsearchIntegrationTest.buildWithPrivateContext(ElasticsearchIntegrationTest.java:543)
    at org.elasticsearch.test.ElasticsearchIntegrationTest.buildAndPutCluster(ElasticsearchIntegrationTest.java:559)
    at org.elasticsearch.test.ElasticsearchIntegrationTest.beforeInternal(ElasticsearchIntegrationTest.java:263)
    at org.elasticsearch.test.ElasticsearchIntegrationTest.before(ElasticsearchIntegrationTest.java:1742)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

The problem comes from the fact that Maven will retrieve Lucene 4.10.2's dependency on randomizedtesting artifact version 2.1.6. On the other hand ES 1.4.0 uses API from randomizedtesting that seems to be available in later versions: https://github.com/elasticsearch/elasticsearch/blob/v1.4.0/pom.xml#L62

First reported here: https://groups.google.com/forum/#!topic/elasticsearch/WD9S1NdxeBs

@astefan astefan added >docs General docs changes >test Issues or PRs that are addressing/adding tests v1.4.0 labels Nov 12, 2014
@javanna javanna added v1.4.2 and removed v1.4.0 labels Nov 26, 2014
@johtani johtani self-assigned this Dec 6, 2014
@johtani johtani closed this as completed in d78d2ff Dec 6, 2014
@johtani
Copy link
Contributor

johtani commented Dec 6, 2014

Thank you for reporting. Fixed.

@ghiron
Copy link
Contributor

ghiron commented Dec 19, 2014

still have the same kind of exception with 1.4.3-SNAPSHOT (same code works fine with 1.4.2 and same dependencies)

xml
<junit.version>4.10</junit.version>
<elasticsearch.version>1.4.3-SNAPSHOT</elasticsearch.version>
<randomizedtesting-runner.version>2.1.11</randomizedtesting-runner.version>
<lucene.version>4.10.2</lucene.version>


``` java```
java.lang.NoSuchMethodError: org.apache.lucene.store.MMapDirectory.getDirectory()Ljava/nio/file/Path;
at __randomizedtesting.SeedInfo.seed([73D877A9EA36C0AA]:0)
    at org.apache.lucene.store.StoreUtils.toString(StoreUtils.java:36)
    at org.apache.lucene.store.StoreUtils.toString(StoreUtils.java:44)
    at org.apache.lucene.store.RateLimitedFSDirectory.toString(RateLimitedFSDirectory.java:70)
    at java.lang.String.valueOf(String.java:2981)
    at java.lang.StringBuilder.append(StringBuilder.java:131)
    at org.apache.lucene.store.MockDirectoryWrapper.openInput(MockDirectoryWrapper.java:603)
    at org.elasticsearch.index.store.DistributorDirectory.openInput(DistributorDirectory.java:130)
    at org.apache.lucene.store.FilterDirectory.openInput(FilterDirectory.java:80)
    at org.elasticsearch.index.store.Store$StoreDirectory.openInput(Store.java:487)
    at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:113)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:819)
    at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:752)
    at org.apache.lucene.index.SegmentInfos.read(SegmentInfos.java:450)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:781)
    at org.elasticsearch.index.engine.internal.InternalEngine.createWriter(InternalEngine.java:1445)
    at org.elasticsearch.index.engine.internal.InternalEngine.start(InternalEngine.java:273)
    at org.elasticsearch.index.shard.service.InternalIndexShard.postRecovery(InternalIndexShard.java:710)
    at org.elasticsearch.index.gateway.none.NoneIndexShardGateway.recover(NoneIndexShardGateway.java:72)
    at org.elasticsearch.index.gateway.IndexShardGatewayService$1.run(IndexShardGatewayService.java:132)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)

mute pushed a commit to mute/elasticsearch that referenced this issue Jul 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>docs General docs changes >test Issues or PRs that are addressing/adding tests v1.4.2 v1.5.0 v2.0.0-beta1
Projects
None yet
Development

No branches or pull requests

4 participants