diff --git a/core/src/test/java/google/registry/tools/GetClaimsListCommandTest.java b/core/src/test/java/google/registry/tools/GetClaimsListCommandTest.java index a47e296c9..9d7c51eb8 100644 --- a/core/src/test/java/google/registry/tools/GetClaimsListCommandTest.java +++ b/core/src/test/java/google/registry/tools/GetClaimsListCommandTest.java @@ -22,14 +22,20 @@ import static org.joda.time.DateTimeZone.UTC; import com.google.common.collect.ImmutableMap; import google.registry.model.tmch.ClaimsList; import google.registry.model.tmch.ClaimsListDao; +import google.registry.testing.TestCacheExtension; import java.io.File; import java.nio.file.Files; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; /** Unit tests for {@link GetClaimsListCommand}. */ class GetClaimsListCommandTest extends CommandTestCase { + @RegisterExtension + public final TestCacheExtension testCacheExtension = + new TestCacheExtension.Builder().withClaimsListCache(java.time.Duration.ofHours(6)).build(); + @Test void testSuccess_getWorks() throws Exception { ClaimsListDao.save(ClaimsList.create(DateTime.now(UTC), ImmutableMap.of("a", "1", "b", "2"))); diff --git a/core/src/test/java/google/registry/tools/UploadClaimsListCommandTest.java b/core/src/test/java/google/registry/tools/UploadClaimsListCommandTest.java index fab1886f4..48433bc4a 100644 --- a/core/src/test/java/google/registry/tools/UploadClaimsListCommandTest.java +++ b/core/src/test/java/google/registry/tools/UploadClaimsListCommandTest.java @@ -20,13 +20,19 @@ import static org.junit.jupiter.api.Assertions.assertThrows; import google.registry.model.tmch.ClaimsList; import google.registry.model.tmch.ClaimsListDao; +import google.registry.testing.TestCacheExtension; import java.io.FileNotFoundException; import org.joda.time.DateTime; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.RegisterExtension; /** Unit tests for {@link UploadClaimsListCommand}. */ class UploadClaimsListCommandTest extends CommandTestCase { + @RegisterExtension + public final TestCacheExtension testCacheExtension = + new TestCacheExtension.Builder().withClaimsListCache(java.time.Duration.ofHours(6)).build(); + @Test void testSuccess() throws Exception { String filename = writeToTmpFile(