mirror of
https://github.com/google/nomulus
synced 2026-09-06 16:17:13 +00:00
Compile Nomulus with Java 21 (#2344)
Make the necessary changes for the code base to compile with JDK 21. Other changes: 1. Upgraded testcontainer version and the SQL image version (to be the same as what we use in Cloud SQL). This led to some schema changes and also changed the order of results in some test queries (for the better I think, as the new order appears to be alphabetical). 2. Remove dependency on Truth8, which is deprecated. 3. Enable parallel Gradle task execution and greatly increased the number of parallel tests in standardTest. Removed outcastTest.
This commit is contained in:
@@ -16,7 +16,6 @@ package google.registry.batch;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.BsaDiffCreator.ORDER_ID_SENTINEL;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
import static org.mockito.ArgumentMatchers.anyString;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.bsa;
|
||||
|
||||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.persistence.BsaTestingUtils.createDownloadScheduler;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedDomainToList;
|
||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
||||
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package google.registry.bsa.api;
|
||||
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.bsa.api.JsonSerializations.toCompletedOrdersReport;
|
||||
import static google.registry.bsa.api.JsonSerializations.toInProgressOrdersReport;
|
||||
import static google.registry.bsa.api.JsonSerializations.toUnblockableDomainsReport;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static org.joda.time.DateTimeZone.UTC;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.DownloadStage.CHECKSUMS_DO_NOT_MATCH;
|
||||
import static google.registry.bsa.DownloadStage.DONE;
|
||||
import static google.registry.bsa.DownloadStage.DOWNLOAD_BLOCK_LISTS;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.ReservedDomainsTestingUtils.addReservedListsToTld;
|
||||
import static google.registry.bsa.ReservedDomainsTestingUtils.createReservedList;
|
||||
import static google.registry.bsa.persistence.LabelDiffUpdates.applyLabelDiff;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.bsa.persistence;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.RefreshStage.APPLY_CHANGES;
|
||||
import static google.registry.bsa.RefreshStage.DONE;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
|
||||
+5
-1
@@ -34,6 +34,7 @@ import java.util.Arrays;
|
||||
import javax.net.SocketFactory;
|
||||
import org.joda.time.Duration;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Disabled;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.xbill.DNS.ARecord;
|
||||
import org.xbill.DNS.DClass;
|
||||
@@ -111,6 +112,9 @@ class DnsMessageTransportTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("This test hangs and causes OOM when using Java 21")
|
||||
// This test should never have passed. The socket is mocked and calling setSoTimeout() has no
|
||||
// effect whatsoever. We should consider removing it.
|
||||
void testTimeoutReceivingResponse() throws Exception {
|
||||
InputStream mockInputStream = mock(InputStream.class);
|
||||
when(mockInputStream.read()).thenThrow(new SocketTimeoutException("testing"));
|
||||
@@ -142,7 +146,7 @@ class DnsMessageTransportTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
void testResponseIdMismatchThrowsExeption() throws Exception {
|
||||
void testResponseIdMismatchThrowsException() throws Exception {
|
||||
expectedResponse.getHeader().setID(1 + simpleQuery.getHeader().getID());
|
||||
when(mockSocket.getInputStream())
|
||||
.thenReturn(new ByteArrayInputStream(messageToBytesWithLength(expectedResponse)));
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.flows;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.tld.Tld.TldState.PREDELEGATION;
|
||||
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.AVAILABLE;
|
||||
import static google.registry.monitoring.whitebox.CheckApiMetric.Availability.BSA_BLOCKED;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.flows;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.getOnlyHistoryEntryOfType;
|
||||
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
||||
import static google.registry.testing.DatabaseHelper.stripBillingEventId;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.flows;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.TestDataHelper.loadFile;
|
||||
import static google.registry.testing.TestLogHandlerUtils.findFirstLogMessageByPrefix;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.flows;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT_HASH;
|
||||
import static google.registry.testing.DatabaseHelper.loadRegistrar;
|
||||
|
||||
@@ -17,7 +17,6 @@ package google.registry.flows.domain;
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
||||
import static google.registry.flows.FlowTestCase.UserPrivileges.SUPERUSER;
|
||||
import static google.registry.model.billing.BillingBase.Flag.ANCHOR_TENANT;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.flows.domain;
|
||||
|
||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESAVE_TIMES;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.flows.domain;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.flows.domain.DomainTransferFlowTestCase.persistWithPendingTransfer;
|
||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.DEFAULT;
|
||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.NONPREMIUM;
|
||||
@@ -52,7 +51,7 @@ import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.ImmutableSortedMap;
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.common.truth.Truth8;
|
||||
import com.google.common.truth.Truth;
|
||||
import google.registry.flows.EppException;
|
||||
import google.registry.flows.EppRequestSource;
|
||||
import google.registry.flows.FlowUtils.NotLoggedInException;
|
||||
@@ -1345,7 +1344,7 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, Domain>
|
||||
// We still need to verify that the bulk token is removed as it's not being tested as a part of
|
||||
// doSuccessfulTest
|
||||
Domain domain = reloadResourceByForeignKey();
|
||||
Truth8.assertThat(domain.getCurrentBulkToken()).isEmpty();
|
||||
Truth.assertThat(domain.getCurrentBulkToken()).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.flows.domain;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.assertBillingEvents;
|
||||
import static google.registry.testing.DatabaseHelper.assertDomainDnsRequests;
|
||||
import static google.registry.testing.DatabaseHelper.assertPollMessages;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.flows.domain;
|
||||
|
||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.SINGLE_USE;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||
|
||||
@@ -17,7 +17,6 @@ package google.registry.flows.domain;
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.collect.MoreCollectors.onlyElement;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_REQUESTED_TIME;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.PARAM_RESOURCE_KEY;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.testing.DatabaseHelper.persistActiveContact;
|
||||
import static google.registry.testing.DatabaseHelper.persistActiveHost;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
||||
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
||||
import static google.registry.persistence.transaction.JpaTransactionManagerExtension.makeRegistrar1;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.billing;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.UNLIMITED_USE;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
||||
|
||||
@@ -18,7 +18,7 @@ import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableO
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import com.google.common.truth.Truth8;
|
||||
import com.google.common.truth.Truth;
|
||||
import google.registry.model.EntityTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -57,10 +57,10 @@ public class UserDaoTest extends EntityTestCase {
|
||||
UserDao.saveUser(user);
|
||||
User fromDb = UserDao.loadUser("email@email.com").get();
|
||||
// nonexistent one should never exist
|
||||
Truth8.assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
|
||||
Truth.assertThat(UserDao.loadUser("nonexistent@email.com")).isEmpty();
|
||||
// now try deleting the one that does exist
|
||||
tm().transact(() -> tm().delete(fromDb));
|
||||
Truth8.assertThat(UserDao.loadUser("email@email.com")).isEmpty();
|
||||
Truth.assertThat(UserDao.loadUser("email@email.com")).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.contact;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||
import static google.registry.testing.ContactSubject.assertAboutContacts;
|
||||
|
||||
@@ -17,7 +17,6 @@ package google.registry.model.domain;
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.collect.Iterables.getOnlyElement;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKey;
|
||||
import static google.registry.model.billing.BillingBase.RenewalPriceBehavior.SPECIFIED;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.BULK_PRICING;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.domain.token;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.CANCELLED;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.ENDED;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenStatus.NOT_STARTED;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.eppinput;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.eppcommon.EppXmlTransformer.unmarshal;
|
||||
import static google.registry.testing.TestDataHelper.loadBytes;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.model.registrar;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.server;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.server.Lock.LockState.FREE;
|
||||
import static google.registry.model.server.Lock.LockState.IN_USE;
|
||||
import static google.registry.model.server.Lock.LockState.TIMED_OUT;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.model.tld;
|
||||
|
||||
import static com.google.common.collect.ImmutableSet.toImmutableSet;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.SqlHelper.getMostRecentRegistryLockByRepoId;
|
||||
import static google.registry.testing.SqlHelper.getMostRecentUnlockedRegistryLockByRepoId;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.model.tld;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.tld;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.tld.Tlds.hasActiveBsaEnrollment;
|
||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||
import static google.registry.testing.DatabaseHelper.newTld;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.model.tld.label;
|
||||
|
||||
import static com.google.common.collect.ImmutableMap.toImmutableMap;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.DatabaseHelper.newTld;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.model.tld.label;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.tmch;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.model.tmch;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
|
||||
import google.registry.model.EntityTestCase;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package google.registry.monitoring.whitebox;
|
||||
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.persistence.transaction;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.DatabaseException.getSqlError;
|
||||
import static google.registry.persistence.transaction.DatabaseException.getSqlExceptionDetails;
|
||||
import static google.registry.persistence.transaction.DatabaseException.throwIfSqlException;
|
||||
|
||||
+14
-15
@@ -56,7 +56,6 @@ import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.Properties;
|
||||
import java.util.TimeZone;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
@@ -89,7 +88,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
"google/registry/persistence/transaction/cleanup_database.sql";
|
||||
private static final String POSTGRES_DB_NAME = "postgres";
|
||||
// The type of JDBC connections started by the tests. This string value
|
||||
// is documented in PSQL's official user guide.
|
||||
// is documented in PostgreSQL's official user guide.
|
||||
private static final String CONNECTION_BACKEND_TYPE = "client backend";
|
||||
private static final int ACTIVE_CONNECTIONS_CAP = 5;
|
||||
|
||||
@@ -98,7 +97,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
private final ImmutableList<Class<?>> extraEntityClasses;
|
||||
private final ImmutableMap<String, String> userProperties;
|
||||
|
||||
private static final JdbcDatabaseContainer database = create();
|
||||
private static final JdbcDatabaseContainer<?> database = create();
|
||||
private static final HibernateSchemaExporter exporter =
|
||||
HibernateSchemaExporter.create(
|
||||
database.getJdbcUrl(), database.getUsername(), database.getPassword());
|
||||
@@ -117,7 +116,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
// to false.
|
||||
private boolean includeNomulusSchema = true;
|
||||
|
||||
// Whether to pre-polulate some registrars for ease of testing.
|
||||
// Whether to pre-populate some registrars for ease of testing.
|
||||
private final boolean withCannedData;
|
||||
|
||||
private TimeZone originalDefaultTimeZone;
|
||||
@@ -138,9 +137,9 @@ public abstract class JpaTransactionManagerExtension
|
||||
this.withCannedData = withCannedData;
|
||||
}
|
||||
|
||||
private static JdbcDatabaseContainer create() {
|
||||
PostgreSQLContainer container =
|
||||
new PostgreSQLContainer(NomulusPostgreSql.getDockerTag())
|
||||
private static JdbcDatabaseContainer<?> create() {
|
||||
PostgreSQLContainer<?> container =
|
||||
new PostgreSQLContainer<>(NomulusPostgreSql.getDockerTag())
|
||||
.withDatabaseName(POSTGRES_DB_NAME);
|
||||
container.start();
|
||||
return container;
|
||||
@@ -152,7 +151,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
Stream.of(initScriptPath.orElse("")),
|
||||
extraEntityClasses.stream().map(Class::getCanonicalName))
|
||||
.sorted()
|
||||
.collect(Collectors.toList())
|
||||
.toList()
|
||||
.hashCode();
|
||||
}
|
||||
|
||||
@@ -182,9 +181,9 @@ public abstract class JpaTransactionManagerExtension
|
||||
|
||||
/**
|
||||
* Returns the full set of properties for setting up JPA {@link EntityManagerFactory} to the test
|
||||
* database. This allows creation of customized JPA by individual tests.
|
||||
* database. This allows the creation of customized JPA by individual tests.
|
||||
*
|
||||
* <p>Test that create {@code EntityManagerFactory} instances are reponsible for tearing them
|
||||
* <p>Test that create {@code EntityManagerFactory} instances are responsible for tearing them
|
||||
* down.
|
||||
*/
|
||||
public ImmutableMap<String, String> getJpaProperties() {
|
||||
@@ -248,7 +247,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
TimeZone.setDefault(originalDefaultTimeZone);
|
||||
}
|
||||
|
||||
public JdbcDatabaseContainer getDatabase() {
|
||||
public JdbcDatabaseContainer<?> getDatabase() {
|
||||
return database;
|
||||
}
|
||||
|
||||
@@ -274,11 +273,11 @@ public abstract class JpaTransactionManagerExtension
|
||||
}
|
||||
|
||||
/**
|
||||
* Asserts that the number of connections to the test database is reasonable, i.e. less than 5.
|
||||
* Asserts that the number of connections to the test database is reasonable, i.e., less than 5.
|
||||
* Ideally, it should be 0 if the connection is closed by the test as we don't use a connection
|
||||
* pool. However, Hibernate may still maintain some connection by it self. In addition, the
|
||||
* pool. However, Hibernate may still maintain some connection by itself. In addition, the
|
||||
* metadata table we use to detect active connection may not remove the closed connection
|
||||
* immediately. So, we decide to relax the condition to check if the number of active connection
|
||||
* immediately. So, we decide to relax the condition to check if the number of active connections
|
||||
* is less than 5 to reduce flakiness.
|
||||
*/
|
||||
private void assertReasonableNumDbConnections() {
|
||||
@@ -359,7 +358,7 @@ public abstract class JpaTransactionManagerExtension
|
||||
.build())
|
||||
.setLocalizedAddress(
|
||||
new RegistrarAddress.Builder()
|
||||
.setStreet(ImmutableList.of("123 Example B\u0151ulevard"))
|
||||
.setStreet(ImmutableList.of("123 Example Bőulevard"))
|
||||
.setCity("Williamsburg")
|
||||
.setState("NY")
|
||||
.setZip("11211")
|
||||
|
||||
+3
-4
@@ -22,7 +22,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.truth.Truth8;
|
||||
import com.google.common.truth.Truth;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.persistence.VKey;
|
||||
import google.registry.persistence.transaction.JpaTestExtensions.JpaUnitTestExtension;
|
||||
@@ -328,11 +328,10 @@ public class TransactionManagerTest {
|
||||
@Test
|
||||
void loadSingleton_returnsValue_orEmpty() {
|
||||
assertEntityNotExist(theEntity);
|
||||
Truth8.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
|
||||
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).isEmpty();
|
||||
|
||||
tm().transact(() -> tm().insert(theEntity));
|
||||
Truth8.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class)))
|
||||
.hasValue(theEntity);
|
||||
Truth.assertThat(tm().transact(() -> tm().loadSingleton(TestEntity.class))).hasValue(theEntity);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -381,8 +381,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||
|
||||
private JsonObject generateExpectedJsonForTwoDomainsCatStarReplySql() {
|
||||
return jsonFileBuilder()
|
||||
.addDomain("cat2.lol", "17-LOL")
|
||||
.addDomain("cat.lol", "C-LOL")
|
||||
.addDomain("cat2.lol", "17-LOL")
|
||||
.load("rdap_domains_two.json");
|
||||
}
|
||||
|
||||
@@ -938,11 +938,11 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||
.isEqualTo(
|
||||
jsonFileBuilder()
|
||||
.addDomain("cat.1.test", "39-1_TEST")
|
||||
.addDomain("cat2.lol", "17-LOL")
|
||||
.addDomain("cat.example", "21-EXAMPLE")
|
||||
.addDomain("cat.lol", "C-LOL")
|
||||
.setNextQuery("name=cat*&cursor=Y2F0LmxvbA%3D%3D")
|
||||
.load("rdap_domains_four_truncated.json"));
|
||||
.addDomain("cat.みんな", "2D-Q9JYB4C")
|
||||
.setNextQuery("name=cat*&cursor=Y2F0LnhuLS1xOWp5YjRj")
|
||||
.load("rdap_domains_four_with_one_unicode_truncated.json"));
|
||||
assertThat(response.getStatus()).isEqualTo(200);
|
||||
verifyMetrics(SearchType.BY_DOMAIN_NAME, Optional.of(5L), IncompletenessWarningType.TRUNCATED);
|
||||
}
|
||||
@@ -1109,8 +1109,8 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||
assertThat(generateActualJson(RequestType.NAME, "*.lol"))
|
||||
.isEqualTo(
|
||||
jsonFileBuilder()
|
||||
.addDomain("cat2.lol", "17-LOL")
|
||||
.addDomain("cat.lol", "C-LOL")
|
||||
.addDomain("cat2.lol", "17-LOL")
|
||||
.addDomain("domain1.lol", "4B-LOL")
|
||||
.addDomain("domain2.lol", "4A-LOL")
|
||||
.setNextQuery("name=*.lol&cursor=ZG9tYWluMi5sb2w%3D")
|
||||
@@ -1159,9 +1159,9 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||
RequestType.NAME,
|
||||
"domain*.lol",
|
||||
ImmutableList.of(
|
||||
"domain1.lol",
|
||||
"domain10.lol",
|
||||
"domain11.lol",
|
||||
"domain1.lol",
|
||||
"domain2.lol",
|
||||
"domain3.lol",
|
||||
"domain4.lol",
|
||||
@@ -1179,11 +1179,11 @@ class RdapDomainSearchActionTest extends RdapSearchActionTestCase<RdapDomainSear
|
||||
RequestType.NAME,
|
||||
"*.lol",
|
||||
ImmutableList.of(
|
||||
"cat2.lol",
|
||||
"cat.lol",
|
||||
"cat2.lol",
|
||||
"domain1.lol",
|
||||
"domain10.lol",
|
||||
"domain11.lol",
|
||||
"domain1.lol",
|
||||
"domain2.lol",
|
||||
"domain3.lol",
|
||||
"domain4.lol",
|
||||
|
||||
@@ -702,10 +702,10 @@ class RdapNameserverSearchActionTest extends RdapSearchActionTestCase<RdapNamese
|
||||
"ns*",
|
||||
ImmutableList.of(
|
||||
"ns1.cat.1.test",
|
||||
"ns1.cat2.lol",
|
||||
"ns1.cat.external",
|
||||
"ns1.cat.lol",
|
||||
"ns1.cat.xn--q9jyb4c",
|
||||
"ns1.cat2.lol",
|
||||
"ns2.cat.lol",
|
||||
"nsx1.cat.lol",
|
||||
"nsx2.cat.lol",
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.rde;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ package google.registry.rde;
|
||||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assertWithMessage;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.persistEppResource;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
|
||||
@@ -28,7 +28,7 @@ import static org.joda.time.DateTimeConstants.TUESDAY;
|
||||
import static org.joda.time.Duration.standardDays;
|
||||
|
||||
import com.google.common.collect.ImmutableSetMultimap;
|
||||
import com.google.common.truth.Truth8;
|
||||
import com.google.common.truth.Truth;
|
||||
import google.registry.model.common.Cursor;
|
||||
import google.registry.model.common.Cursor.CursorType;
|
||||
import google.registry.model.tld.Tld;
|
||||
@@ -95,7 +95,7 @@ public class PendingDepositCheckerTest {
|
||||
createTldWithEscrowEnabled("lol");
|
||||
clock.advanceOneMilli();
|
||||
Tld registry = Tld.get("lol");
|
||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
|
||||
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(RDE_STAGING, registry))).isEmpty();
|
||||
checker.getTldsAndWatermarksPendingDepositForRdeAndBrda();
|
||||
assertThat(loadByKey(Cursor.createScopedVKey(RDE_STAGING, registry)).getCursorTime())
|
||||
.isEqualTo(DateTime.parse("2000-01-01TZ"));
|
||||
@@ -122,9 +122,9 @@ public class PendingDepositCheckerTest {
|
||||
clock.advanceOneMilli();
|
||||
setCursor(registry, RDE_STAGING, DateTime.parse("2000-01-02TZ")); // assume rde is already done
|
||||
clock.advanceOneMilli();
|
||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||
assertThat(checker.getTldsAndWatermarksPendingDepositForRdeAndBrda()).isEmpty();
|
||||
Truth8.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||
Truth.assertThat(loadByKeyIfPresent(Cursor.createScopedVKey(BRDA, registry))).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -19,7 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
import com.google.common.truth.Truth8;
|
||||
import com.google.common.truth.Truth;
|
||||
import google.registry.request.HttpException.BadRequestException;
|
||||
import google.registry.testing.FakeClock;
|
||||
import google.registry.util.Clock;
|
||||
@@ -45,13 +45,13 @@ class ReportingModuleTest {
|
||||
@Test
|
||||
void testEmptyYearMonthParameter_returnsEmptyYearMonthOptional() {
|
||||
when(req.getParameter("yearMonth")).thenReturn("");
|
||||
Truth8.assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
|
||||
Truth.assertThat(ReportingModule.provideYearMonthOptional(req)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testValidYearMonthParameter_returnsThatMonth() {
|
||||
when(req.getParameter("yearMonth")).thenReturn("2017-05");
|
||||
Truth8.assertThat(ReportingModule.provideYearMonthOptional(req))
|
||||
Truth.assertThat(ReportingModule.provideYearMonthOptional(req))
|
||||
.hasValue(new YearMonth(2017, 5));
|
||||
}
|
||||
|
||||
@@ -83,14 +83,13 @@ class ReportingModuleTest {
|
||||
@Test
|
||||
void testEmptyDateParameter_returnsEmptyDateOptional() {
|
||||
when(req.getParameter("date")).thenReturn("");
|
||||
Truth8.assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
|
||||
Truth.assertThat(ReportingModule.provideDateOptional(req)).isEmpty();
|
||||
}
|
||||
|
||||
@Test
|
||||
void testValidDateParameter_returnsThatDate() {
|
||||
when(req.getParameter("date")).thenReturn("2017-05-13");
|
||||
Truth8.assertThat(ReportingModule.provideDateOptional(req))
|
||||
.hasValue(new LocalDate(2017, 5, 13));
|
||||
Truth.assertThat(ReportingModule.provideDateOptional(req)).hasValue(new LocalDate(2017, 5, 13));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.reporting.billing;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.mockito.Mockito.doThrow;
|
||||
import static org.mockito.Mockito.mock;
|
||||
|
||||
-1
@@ -15,7 +15,6 @@
|
||||
package google.registry.reporting.spec11;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static org.mockito.Mockito.mock;
|
||||
import static org.mockito.Mockito.when;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.request;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.request.Action.Method.GET;
|
||||
import static google.registry.request.Action.Method.POST;
|
||||
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.request;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.request.RequestParameters.extractBooleanParameter;
|
||||
import static google.registry.request.RequestParameters.extractEnumParameter;
|
||||
import static google.registry.request.RequestParameters.extractOptionalDatetimeParameter;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.request;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.request.auth.Auth.AUTH_API_ADMIN;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.request.auth;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.request.auth.AuthResult.NOT_AUTHENTICATED;
|
||||
import static google.registry.request.auth.AuthSettings.AuthLevel.APP;
|
||||
import static google.registry.request.auth.AuthSettings.AuthLevel.NONE;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tldconfig.idn;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.tmch;
|
||||
|
||||
import static com.google.common.collect.ImmutableList.toImmutableList;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static org.mockito.Mockito.times;
|
||||
import static org.mockito.Mockito.verify;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.EntityYamlUtils.createObjectMapper;
|
||||
import static google.registry.model.domain.token.AllocationToken.TokenType.DEFAULT_PROMO;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
import static google.registry.util.DateTimeUtils.END_OF_TIME;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.loadPremiumEntries;
|
||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static org.junit.Assert.assertThrows;
|
||||
|
||||
import google.registry.model.console.GlobalRole;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.batch.AsyncTaskEnqueuer.QUEUE_ASYNC_ACTIONS;
|
||||
import static google.registry.testing.DatabaseHelper.assertNoBillingEvents;
|
||||
import static google.registry.testing.DatabaseHelper.createTlds;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
||||
import static google.registry.model.tld.Tld.TldState.GENERAL_AVAILABILITY;
|
||||
import static google.registry.model.tld.Tld.TldState.START_DATE_SUNRISE;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static google.registry.testing.DatabaseHelper.persistResource;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.loadByKey;
|
||||
import static google.registry.testing.DatabaseHelper.loadByKeyIfPresent;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.DatabaseHelper.createTld;
|
||||
import static google.registry.testing.DatabaseHelper.loadAllOf;
|
||||
import static google.registry.testing.DatabaseHelper.loadByEntity;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT3_HASH;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.tld.label.ReservationType.FULLY_BLOCKED;
|
||||
import static google.registry.testing.DatabaseHelper.persistReservedList;
|
||||
import static google.registry.testing.TestDataHelper.loadFile;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.persistence.transaction.TransactionManagerFactory.tm;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.tools.params;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.tools.params.NameserversParameter.splitNameservers;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package google.registry.tools.params;
|
||||
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -18,7 +18,6 @@ import static com.google.common.collect.Range.atLeast;
|
||||
import static com.google.common.collect.Range.atMost;
|
||||
import static com.google.common.collect.Range.closed;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.ui.forms;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
package google.registry.ui.server;
|
||||
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
@@ -16,7 +16,6 @@ package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.net.HttpHeaders.LOCATION;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.registrar.Registrar.loadByRegistrarId;
|
||||
import static google.registry.testing.DatabaseHelper.persistPremiumList;
|
||||
import static javax.servlet.http.HttpServletResponse.SC_MOVED_TEMPORARILY;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.ui.server.registrar;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.ImmutableObjectSubject.assertAboutImmutableObjects;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT;
|
||||
import static google.registry.testing.CertificateSamples.SAMPLE_CERT2;
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
package google.registry.whois;
|
||||
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.bsa.persistence.BsaTestingUtils.persistBsaLabel;
|
||||
import static google.registry.model.EppResourceUtils.loadByForeignKeyCached;
|
||||
import static google.registry.model.registrar.Registrar.State.ACTIVE;
|
||||
|
||||
Reference in New Issue
Block a user