Exclude tests from Git repository object counting and leaks check This check is unreliable and is causing data race issues. These tests are for testing the supermanifest plugin. Checking repository object counting and leaks is unrelated, hence disable this. Release-Notes: skip Bug: Google b/396827990 Change-Id: Ie2ea19f0130178114c6914467c47bbf98e288bdd Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/javatests/com/googlesource/gerrit/plugins/supermanifest/ConfigEntryTest.java b/javatests/com/googlesource/gerrit/plugins/supermanifest/ConfigEntryTest.java index 080918d..727fdab 100644 --- a/javatests/com/googlesource/gerrit/plugins/supermanifest/ConfigEntryTest.java +++ b/javatests/com/googlesource/gerrit/plugins/supermanifest/ConfigEntryTest.java
@@ -18,6 +18,7 @@ import static org.junit.Assert.fail; import com.google.gerrit.entities.Project; +import com.google.gerrit.testing.NoGitRepositoryCheckIfClosed; import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.Config; import org.junit.Test; @@ -25,6 +26,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +@NoGitRepositoryCheckIfClosed public class ConfigEntryTest { @Test @@ -219,12 +221,12 @@ public void recordRemoteBranch() throws ConfigInvalidException { StringBuilder builder = new StringBuilder( - getBasicConf( - "superproject", - "refs/heads/nyc", - "manifest", - "refs/heads/nyc-src", - "default.xml")) + getBasicConf( + "superproject", + "refs/heads/nyc", + "manifest", + "refs/heads/nyc-src", + "default.xml")) .append(" recordRemoteBranch = false\n"); Config cfg = new Config(); cfg.fromText(builder.toString());
diff --git a/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritRemoteReaderTest.java b/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritRemoteReaderTest.java index b2a12c8..c248c56 100644 --- a/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritRemoteReaderTest.java +++ b/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritRemoteReaderTest.java
@@ -6,6 +6,7 @@ import com.google.gerrit.entities.Project; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.testing.InMemoryRepositoryManager; +import com.google.gerrit.testing.NoGitRepositoryCheckIfClosed; import java.io.IOException; import java.nio.charset.StandardCharsets; import org.eclipse.jgit.api.errors.GitAPIException; @@ -21,6 +22,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +@NoGitRepositoryCheckIfClosed public class GerritRemoteReaderTest { private static final String MASTER = "refs/heads/master";
diff --git a/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritSuperManifestRepoManagerTest.java b/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritSuperManifestRepoManagerTest.java index 2fb9591..63954a6 100644 --- a/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritSuperManifestRepoManagerTest.java +++ b/javatests/com/googlesource/gerrit/plugins/supermanifest/GerritSuperManifestRepoManagerTest.java
@@ -5,6 +5,7 @@ import com.google.gerrit.entities.Project; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.testing.InMemoryRepositoryManager; +import com.google.gerrit.testing.NoGitRepositoryCheckIfClosed; import java.io.IOException; import org.eclipse.jgit.lib.Repository; import org.junit.Before; @@ -13,6 +14,7 @@ import org.junit.runners.JUnit4; @RunWith(JUnit4.class) +@NoGitRepositoryCheckIfClosed public class GerritSuperManifestRepoManagerTest { private static final String CANONICAL_WEB_URL = "https://example.com/gerrit/";
diff --git a/javatests/com/googlesource/gerrit/plugins/supermanifest/JiriSuperManifestIT.java b/javatests/com/googlesource/gerrit/plugins/supermanifest/JiriSuperManifestIT.java index 03e1296..8017b3e 100644 --- a/javatests/com/googlesource/gerrit/plugins/supermanifest/JiriSuperManifestIT.java +++ b/javatests/com/googlesource/gerrit/plugins/supermanifest/JiriSuperManifestIT.java
@@ -32,6 +32,7 @@ import com.google.gerrit.extensions.registration.DynamicMap; import com.google.gerrit.extensions.registration.PrivateInternals_DynamicMapImpl; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; +import com.google.gerrit.testing.NoGitRepositoryCheckIfClosed; import com.google.inject.Inject; import com.google.inject.util.Providers; import java.net.URI; @@ -47,6 +48,7 @@ @TestPlugin( name = "supermanifest", sysModule = "com.googlesource.gerrit.plugins.supermanifest.SuperManifestModule") +@NoGitRepositoryCheckIfClosed public class JiriSuperManifestIT extends LightweightPluginDaemonTest { Project.NameKey[] testRepoKeys;
diff --git a/javatests/com/googlesource/gerrit/plugins/supermanifest/RepoSuperManifestIT.java b/javatests/com/googlesource/gerrit/plugins/supermanifest/RepoSuperManifestIT.java index a0270fd..6005402 100644 --- a/javatests/com/googlesource/gerrit/plugins/supermanifest/RepoSuperManifestIT.java +++ b/javatests/com/googlesource/gerrit/plugins/supermanifest/RepoSuperManifestIT.java
@@ -31,6 +31,7 @@ import com.google.gerrit.entities.RefNames; import com.google.gerrit.extensions.api.projects.BranchApi; import com.google.gerrit.extensions.restapi.ResourceNotFoundException; +import com.google.gerrit.testing.NoGitRepositoryCheckIfClosed; import com.google.inject.Inject; import java.net.URI; import java.util.Arrays; @@ -45,6 +46,7 @@ @TestPlugin( name = "supermanifest", sysModule = "com.googlesource.gerrit.plugins.supermanifest.SuperManifestModule") +@NoGitRepositoryCheckIfClosed public class RepoSuperManifestIT extends LightweightPluginDaemonTest { Project.NameKey[] testRepoKeys;