aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build.gradle1
-rw-r--r--server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java9
-rw-r--r--settings.gradle1
3 files changed, 10 insertions, 1 deletions
diff --git a/build.gradle b/build.gradle
index 4b4050fa8b8..6339a10c62c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -450,6 +450,7 @@ subprojects {
}
dependency 'org.junit.platform:junit-platform-suite-api:1.10.2'
dependency 'org.junit.platform:junit-platform-suite-engine:1.10.2'
+ dependency 'com.sonarsource.pdfreport:security-report-pdf-generation:1.0.0.98'
dependency 'org.sonarsource.update-center:sonar-update-center-common:1.32.0.2441'
dependency("org.springframework:spring-context:${springVersion}") {
exclude 'commons-logging:commons-logging'
diff --git a/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java b/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java
index 813f13aa96e..e507624ab2e 100644
--- a/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java
+++ b/server/sonar-server-common/src/testFixtures/java/org/sonar/server/es/EsTester.java
@@ -85,6 +85,8 @@ import org.elasticsearch.search.SearchHit;
import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.sort.SortOrder;
import org.elasticsearch.transport.Netty4Plugin;
+import org.junit.jupiter.api.extension.AfterEachCallback;
+import org.junit.jupiter.api.extension.ExtensionContext;
import org.junit.rules.ExternalResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -109,7 +111,7 @@ import static org.sonar.server.es.Index.ALL_INDICES;
import static org.sonar.server.es.IndexType.FIELD_INDEX_TYPE;
import static org.sonar.server.es.newindex.DefaultIndexSettings.REFRESH_IMMEDIATE;
-public class EsTester extends ExternalResource {
+public class EsTester extends ExternalResource implements AfterEachCallback {
private static final int MIN_PORT = 1;
private static final int MAX_PORT = 49151;
@@ -176,6 +178,11 @@ public class EsTester extends ExternalResource {
}
@Override
+ public void afterEach(ExtensionContext extensionContext) throws Exception {
+ after();
+ }
+
+ @Override
protected void after() {
if (isCustom) {
// delete non-core indices
diff --git a/settings.gradle b/settings.gradle
index 284b3f241d2..22d2fa50fdb 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -88,3 +88,4 @@ buildCache {
enabled = !isCiServer
}
}
+