diff --git a/gradle/core/build.gradle b/gradle/core/build.gradle index 2049a27a6..475fe450f 100644 --- a/gradle/core/build.gradle +++ b/gradle/core/build.gradle @@ -13,34 +13,15 @@ def generatedDir = "${project.buildDir}/generated/source/custom/main" def outcastTestPatterns = [ "google/registry/batch/DeleteContactsAndHostsActionTest.*", "google/registry/batch/RefreshDnsOnHostRenameActionTest.*", - "google.registry.export.ExportDomainListsActionTest.*", - "google/registry/export/ExportPremiumTermsActionTest.*", - "google/registry/export/ExportReservedTermsActionTest.*", - "google/registry/export/ExportUtilsTest.*", - "google/registry/export/sheet/SyncRegistrarsSheetTest.*", "google/registry/flows/CheckApiActionTest.*", + "google/registry/flows/EppLifecycleHostTest.*", "google/registry/flows/domain/DomainAllocateFlowTest.*", "google/registry/flows/domain/DomainApplicationCreateFlowTest.*", "google/registry/flows/domain/DomainApplicationUpdateFlowTest.*", "google/registry/flows/domain/DomainCreateFlowTest.*", "google/registry/flows/domain/DomainUpdateFlowTest.*", - "google/registry/flows/EppLifecycleDomainTest.*", - "google/registry/flows/EppLifecycleHostTest.*", - "google/registry/model/poll/PollMessageExternalKeyConverterTest.*", - "google/registry/model/poll/PollMessageTest.*", - "google/registry/rdap/RdapDomainActionTest.*", - "google/registry/rdap/RdapDomainSearchActionTest.*", - "google/registry/rdap/RdapEntityActionTest.*", - "google/registry/rdap/RdapEntitySearchActionTest.*", - "google/registry/rdap/RdapNameserverSearchActionTest.*", - "google/registry/reporting/icann/IcannHttpReporterTest.*", - "google/registry/tmch/LordnTaskUtilsTest.*", - "google/registry/tmch/NordnUploadActionTest.*", + "google/registry/tools/CreateDomainCommandTest.*", "google/registry/tools/server/CreatePremiumListActionTest.*", - "google/registry/ui/server/registrar/ContactSettingsTest.*", - "google/registry/ui/server/registrar/RegistrarSettingsActionTest.*", - "google/registry/ui/server/registrar/SecuritySettingsTest.*", - // Conflicts with WhoisActionTest "google/registry/whois/WhoisHttpActionTest.*", ] @@ -374,6 +355,14 @@ task soyToJava { }.filter { it.name.endsWith(".soy") }) + + soyToJava('google.registry.ui.soy.otesetup', + "${generatedDir}/google/registry/ui/soy/otesetup", + files { + file("${javaDir}/google/registry/ui/soy/otesetup").listFiles() + }.filter { + it.name.endsWith(".soy") + }) } } diff --git a/javatests/google/registry/model/registrar/RegistrarTest.java b/javatests/google/registry/model/registrar/RegistrarTest.java index ed095087f..f9fe18cb7 100644 --- a/javatests/google/registry/model/registrar/RegistrarTest.java +++ b/javatests/google/registry/model/registrar/RegistrarTest.java @@ -454,39 +454,46 @@ public class RegistrarTest extends EntityTestCase { @Test public void testSuccess_setAllowedTldsUncached_newTldNotInCache() { - // Cache duration in tests is 0. To make sure the data isn't in the cache we have to set it to a - // higher value and reset the cache. - RegistryConfig.CONFIG_SETTINGS.get().caching.singletonCacheRefreshSeconds = 600; - Registries.resetCache(); - // Make sure the TLD we want to create doesn't exist yet. - // This is also important because getTlds fills out the cache when used. - assertThat(Registries.getTlds()).doesNotContain("newtld"); - // We can't use createTld here because it failes when the cache is used. - persistResource(newRegistry("newtld", "NEWTLD")); - // Make sure we set up the cache correctly, so the newly created TLD isn't in the cache - assertThat(Registries.getTlds()).doesNotContain("newtld"); + try { + // Cache duration in tests is 0. To make sure the data isn't in the cache we have to set it + // to a higher value and reset the cache. + RegistryConfig.CONFIG_SETTINGS.get().caching.singletonCacheRefreshSeconds = 600; + Registries.resetCache(); + // Make sure the TLD we want to create doesn't exist yet. + // This is also important because getTlds fills out the cache when used. + assertThat(Registries.getTlds()).doesNotContain("newtld"); + // We can't use createTld here because it failes when the cache is used. + persistResource(newRegistry("newtld", "NEWTLD")); + // Make sure we set up the cache correctly, so the newly created TLD isn't in the cache + assertThat(Registries.getTlds()).doesNotContain("newtld"); - // Test that the uncached version works - assertThat( - registrar.asBuilder() - .setAllowedTldsUncached(ImmutableSet.of("newtld")) - .build() - .getAllowedTlds()) - .containsExactly("newtld"); + // Test that the uncached version works + assertThat( + registrar + .asBuilder() + .setAllowedTldsUncached(ImmutableSet.of("newtld")) + .build() + .getAllowedTlds()) + .containsExactly("newtld"); - // Test that the "regular" cached version fails. If this doesn't throw - then we changed how the - // cached version works: - // - either we switched to a different cache type/duration, and we haven't actually set up that - // cache in the test - // - or we stopped using the cache entirely and we should rethink if the Uncached version is - // still needed - assertThrows( - IllegalArgumentException.class, - () -> registrar.asBuilder().setAllowedTlds(ImmutableSet.of("newtld"))); + // Test that the "regular" cached version fails. If this doesn't throw - then we changed how + // the cached version works: + // - either we switched to a different cache type/duration, and we haven't actually set up + // that cache in the test + // - or we stopped using the cache entirely and we should rethink if the Uncached version is + // still needed + assertThrows( + IllegalArgumentException.class, + () -> registrar.asBuilder().setAllowedTlds(ImmutableSet.of("newtld"))); - // Make sure the cache hasn't expired during the test and "newtld" is still not in the cached - // TLDs - assertThat(Registries.getTlds()).doesNotContain("newtld"); + // Make sure the cache hasn't expired during the test and "newtld" is still not in the cached + // TLDs + assertThat(Registries.getTlds()).doesNotContain("newtld"); + } finally { + // Set the cache duration back to 0 to satisfy other tests. + RegistryConfig.CONFIG_SETTINGS.get().caching.singletonCacheRefreshSeconds = 0; + Registries.resetCache(); + } } @Test