Rename AbstractReindexIT to AbstractReindexTests

AbstractReindexIT gets compiled twice, once for each of the reindex
tests (normal and Elasticsearch).

Rename it to AbstractReindexTests so it doesn't get picked up by
the "*IT" glob, and include it in its own java_library rule so that
it only gets compiled once.

Change-Id: I7061826bd077f023b8d1ccc091d72a3a980c0419
This commit is contained in:
David Pursehouse
2018-05-30 06:19:01 +09:00
parent 2b9e9391c3
commit 1d614ae416
4 changed files with 12 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ import org.junit.Test;
@NoHttpd
@Ignore
public abstract class AbstractReindexIT extends StandaloneSiteTest {
public abstract class AbstractReindexTests extends StandaloneSiteTest {
/** @param injector injector */
public abstract void configureIndex(Injector injector) throws Exception;

View File

@@ -7,11 +7,11 @@ acceptance_tests(
),
group = "pgm",
labels = ["pgm"],
deps = [":util"],
)
acceptance_tests(
srcs = [
"AbstractReindexIT.java",
"ElasticReindexIT.java",
],
group = "elastic",
@@ -20,4 +20,12 @@ acceptance_tests(
"elastic",
"pgm",
],
deps = [":util"],
)
java_library(
name = "util",
testonly = 1,
srcs = ["AbstractReindexTests.java"],
deps = ["//gerrit-acceptance-tests:lib"],
)

View File

@@ -25,7 +25,7 @@ import org.eclipse.jgit.lib.Config;
import org.junit.After;
@NoHttpd
public class ElasticReindexIT extends AbstractReindexIT {
public class ElasticReindexIT extends AbstractReindexTests {
private static ElasticContainer<?> container;
@ConfigSuite.Default

View File

@@ -18,7 +18,7 @@ import com.google.gerrit.acceptance.NoHttpd;
import com.google.inject.Injector;
@NoHttpd
public class ReindexIT extends AbstractReindexIT {
public class ReindexIT extends AbstractReindexTests {
@Override
public void configureIndex(Injector injector) throws Exception {}