aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Brandhof <simon.brandhof@sonarsource.com>2018-04-11 12:37:58 +0200
committerSonarTech <sonartech@sonarsource.com>2018-04-12 20:20:48 +0200
commit7265b977503e5f5067585041648f6645b5cd4b86 (patch)
tree36bdfbb6a763e97d29cc0111f7f20dc391b8c054
parent74a8a758bc7e3a1ef6a1aed68b138c906a93759f (diff)
downloadsonarqube-7265b977503e5f5067585041648f6645b5cd4b86.tar.gz
sonarqube-7265b977503e5f5067585041648f6645b5cd4b86.zip
Drop unused dependency org.elasticsearch.test:framework
-rw-r--r--build.gradle3
-rw-r--r--server/sonar-server/build.gradle6
-rw-r--r--server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java4
3 files changed, 2 insertions, 11 deletions
diff --git a/build.gradle b/build.gradle
index 95fb87f80b2..15751f75c65 100644
--- a/build.gradle
+++ b/build.gradle
@@ -71,7 +71,6 @@ subprojects {
artifactoryPublish.skip = true
ext {
- elasticsearchVersion = '5.6.3'
protobufVersion = '3.5.1'
}
@@ -179,7 +178,7 @@ subprojects {
entry 'jetty-server'
entry 'jetty-servlet'
}
- dependency("org.elasticsearch.client:transport:${elasticsearchVersion}") {
+ dependency('org.elasticsearch.client:transport:5.6.3') {
exclude 'org.elasticsearch.plugin:lang-mustache-client'
exclude 'org.elasticsearch.plugin:transport-netty3-client'
exclude 'commons-logging:commons-logging'
diff --git a/server/sonar-server/build.gradle b/server/sonar-server/build.gradle
index 130487ef396..761efd7ae1b 100644
--- a/server/sonar-server/build.gradle
+++ b/server/sonar-server/build.gradle
@@ -74,12 +74,6 @@ dependencies {
testCompile 'org.apache.logging.log4j:log4j-core'
testCompile 'org.assertj:assertj-core'
testCompile 'org.assertj:assertj-guava'
- testCompile("org.elasticsearch.test:framework:${elasticsearchVersion}") {
- // should be excluded to avoid ES go into "test mode" and require to run EsTester-based UTs with RandomizedRunner
- exclude group: 'com.carrotsearch.randomizedtesting', module: 'randomizedtesting-runner'
- exclude group: 'org.elasticsearch', module: 'securemock'
- exclude group: 'commons-logging', module: 'commons-logging'
- }
testCompile 'org.hamcrest:hamcrest-all'
testCompile 'org.mockito:mockito-core'
testCompile 'org.reflections:reflections'
diff --git a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java
index 552db86f990..bb0be1280b8 100644
--- a/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java
+++ b/server/sonar-server/src/test/java/org/sonar/server/es/EsTester.java
@@ -54,7 +54,6 @@ import org.elasticsearch.env.Environment;
import org.elasticsearch.env.NodeEnvironment;
import org.elasticsearch.index.IndexNotFoundException;
import org.elasticsearch.indices.recovery.RecoverySettings;
-import org.elasticsearch.node.MockNode;
import org.elasticsearch.node.Node;
import org.elasticsearch.search.SearchHit;
import org.junit.rules.ExternalResource;
@@ -70,7 +69,6 @@ import org.sonar.server.view.index.ViewIndexDefinition;
import static com.google.common.base.Preconditions.checkState;
import static com.google.common.collect.Lists.newArrayList;
-import static java.util.Collections.emptyList;
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
import static org.sonar.server.es.DefaultIndexSettings.REFRESH_IMMEDIATE;
@@ -328,7 +326,7 @@ public class EsTester extends ExternalResource {
.put(NetworkModule.HTTP_ENABLED.getKey(), false)
.put(DiscoveryModule.DISCOVERY_TYPE_SETTING.getKey(), "single-node")
.build();
- MockNode node = new MockNode(settings, emptyList());
+ Node node = new Node(settings);
return node.start();
} catch (Exception e) {
throw new IllegalStateException("Fail to start embedded Elasticsearch", e);