mirror of
https://github.com/google/nomulus.git
synced 2025-07-07 03:33:28 +02:00
Fix TimestampInversionException (#1065)
* Fix TimestampInversionException * Add autoIncrement * unset auto increment mode
This commit is contained in:
parent
994af085d8
commit
65f35ac8c1
2 changed files with 24 additions and 2 deletions
|
@ -43,6 +43,7 @@ import google.registry.testing.TestCacheExtension;
|
|||
import google.registry.testing.TestOfyAndSql;
|
||||
import org.joda.time.DateTime;
|
||||
import org.joda.time.Duration;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
|
||||
|
@ -61,7 +62,7 @@ public class PremiumListDualDaoTest extends EntityTestCase {
|
|||
@BeforeEach
|
||||
void before() {
|
||||
createTld("tld");
|
||||
|
||||
fakeClock.setAutoIncrementStep(Duration.millis(1));
|
||||
fakeClock.setTo(DateTime.parse("1984-12-21T00:00:00.000Z"));
|
||||
DatabaseTransitionSchedule schedule =
|
||||
DatabaseTransitionSchedule.create(
|
||||
|
@ -77,6 +78,11 @@ public class PremiumListDualDaoTest extends EntityTestCase {
|
|||
tm().transactNew(() -> ofyTm().putWithoutBackup(schedule));
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void after() {
|
||||
fakeClock.setAutoIncrementStep(Duration.ZERO);
|
||||
}
|
||||
|
||||
@TestOfyAndSql
|
||||
void testGetPremiumPrice_secondaryLoadMissingSql() {
|
||||
PremiumListSqlDao.delete(PremiumListSqlDao.getLatestRevision("tld").get());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue