From 1719d066cf22a2db18798092c3baca5ab993bdef Mon Sep 17 00:00:00 2001 From: Lai Jiang Date: Thu, 23 Jun 2022 14:19:20 -0400 Subject: [PATCH] Disable all tests that uses Ofy (#1679) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit These tests use Ofy exclusively and should not run anymore, as any class they test also use Ofy and should be deleted. More importantly, running tests in Ofy mode makes it hard to remove Ofy from entities, especially Registrar and RegistrarContact, as some of them are created as canned data when tests are initiated, and the creation would fail if they are not registered as Ofy entities. It is therefore a prerequisite to disable these tests before we can remove Ofy from those entities. We could have deleted them, but I think that should be done when the corresponding classes tested by them are deleted. --- This change is [Reviewable](https://reviewable.io/reviews/google/nomulus/1679) --- .../registry/model/ofy/DatastoreTransactionManagerTest.java | 2 ++ core/src/test/java/google/registry/model/ofy/OfyTest.java | 2 ++ 2 files changed, 4 insertions(+) diff --git a/core/src/test/java/google/registry/model/ofy/DatastoreTransactionManagerTest.java b/core/src/test/java/google/registry/model/ofy/DatastoreTransactionManagerTest.java index 8766d3a6c..40ae13d9b 100644 --- a/core/src/test/java/google/registry/model/ofy/DatastoreTransactionManagerTest.java +++ b/core/src/test/java/google/registry/model/ofy/DatastoreTransactionManagerTest.java @@ -29,11 +29,13 @@ import google.registry.model.annotations.InCrossTld; import google.registry.model.common.EntityGroupRoot; import google.registry.testing.AppEngineExtension; import google.registry.testing.TmOverrideExtension; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; /** Unit tests for {@link DatastoreTransactionManager}. */ +@Disabled public class DatastoreTransactionManagerTest { @RegisterExtension diff --git a/core/src/test/java/google/registry/model/ofy/OfyTest.java b/core/src/test/java/google/registry/model/ofy/OfyTest.java index f842866c2..274f207c9 100644 --- a/core/src/test/java/google/registry/model/ofy/OfyTest.java +++ b/core/src/test/java/google/registry/model/ofy/OfyTest.java @@ -55,11 +55,13 @@ import java.util.ConcurrentModificationException; import java.util.function.Supplier; import org.joda.time.DateTime; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; /** Tests for our wrapper around Objectify. */ +@Disabled public class OfyTest { private final FakeClock fakeClock = new FakeClock(DateTime.parse("2000-01-01TZ"));