mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 12:07:51 +02:00
Add replay & compare to ContactCreateFlowTest test (#976)
* Add replay & compare to ContactCreateFlowTest test This test exposed a write priority issue between ContactResource and ContactHistory entries.
This commit is contained in:
parent
179ffeb148
commit
519cbfb660
2 changed files with 8 additions and 1 deletions
|
@ -41,9 +41,9 @@ public class EntityWritePriorities {
|
||||||
*/
|
*/
|
||||||
static final ImmutableMap<String, Integer> CLASS_PRIORITIES =
|
static final ImmutableMap<String, Integer> CLASS_PRIORITIES =
|
||||||
ImmutableMap.of(
|
ImmutableMap.of(
|
||||||
|
"ContactResource", -15,
|
||||||
"HistoryEntry", -10,
|
"HistoryEntry", -10,
|
||||||
"AllocationToken", -9,
|
"AllocationToken", -9,
|
||||||
"ContactResource", 5,
|
|
||||||
"DomainBase", 10);
|
"DomainBase", 10);
|
||||||
|
|
||||||
// The beginning of the range of priority numbers reserved for delete. This must be greater than
|
// The beginning of the range of priority numbers reserved for delete. This must be greater than
|
||||||
|
|
|
@ -33,13 +33,20 @@ import google.registry.flows.exceptions.ResourceAlreadyExistsForThisClientExcept
|
||||||
import google.registry.flows.exceptions.ResourceCreateContentionException;
|
import google.registry.flows.exceptions.ResourceCreateContentionException;
|
||||||
import google.registry.model.contact.ContactResource;
|
import google.registry.model.contact.ContactResource;
|
||||||
import google.registry.testing.DualDatabaseTest;
|
import google.registry.testing.DualDatabaseTest;
|
||||||
|
import google.registry.testing.ReplayExtension;
|
||||||
import google.registry.testing.TestOfyAndSql;
|
import google.registry.testing.TestOfyAndSql;
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import org.junit.jupiter.api.Order;
|
||||||
|
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||||
|
|
||||||
/** Unit tests for {@link ContactCreateFlow}. */
|
/** Unit tests for {@link ContactCreateFlow}. */
|
||||||
@DualDatabaseTest
|
@DualDatabaseTest
|
||||||
class ContactCreateFlowTest extends ResourceFlowTestCase<ContactCreateFlow, ContactResource> {
|
class ContactCreateFlowTest extends ResourceFlowTestCase<ContactCreateFlow, ContactResource> {
|
||||||
|
|
||||||
|
@Order(value = Order.DEFAULT - 2)
|
||||||
|
@RegisterExtension
|
||||||
|
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
||||||
|
|
||||||
ContactCreateFlowTest() {
|
ContactCreateFlowTest() {
|
||||||
setEppInput("contact_create.xml");
|
setEppInput("contact_create.xml");
|
||||||
clock.setTo(DateTime.parse("1999-04-03T22:00:00.0Z"));
|
clock.setTo(DateTime.parse("1999-04-03T22:00:00.0Z"));
|
||||||
|
|
Loading…
Add table
Reference in a new issue