mirror of
https://github.com/google/nomulus.git
synced 2025-04-30 03:57:51 +02:00
Add double-replay to remaining existing ReplayExtension calls (#1297)
The only other change is that we need to reconstitute serverApproveEntities for DomainTransferData in more situations (to fill out the ofy keys)
This commit is contained in:
parent
ae87f72550
commit
d3b07f6ab0
27 changed files with 30 additions and 28 deletions
|
@ -157,10 +157,12 @@ public class DomainTransferData extends TransferData<DomainTransferData.Builder>
|
||||||
DomainBase.restoreOfyFrom(rootKey, billingCancellationId, billingCancellationHistoryId);
|
DomainBase.restoreOfyFrom(rootKey, billingCancellationId, billingCancellationHistoryId);
|
||||||
|
|
||||||
// Reconstruct server approve entities. We currently have to call postLoad() a _second_ time
|
// Reconstruct server approve entities. We currently have to call postLoad() a _second_ time
|
||||||
// if the billing cancellation id has been reconstituted, as it is part of that set.
|
// if any of the billing objects have been reconstituted, as they are part of that set.
|
||||||
// TODO(b/183010623): Normalize the approaches to VKey reconstitution for the TransferData
|
// TODO(b/183010623): Normalize the approaches to VKey reconstitution for the TransferData
|
||||||
// hierarchy (the logic currently lives either in PostLoad or here, depending on the key).
|
// hierarchy (the logic currently lives either in PostLoad or here, depending on the key).
|
||||||
if (billingCancellationId != null) {
|
if (billingCancellationId != null
|
||||||
|
|| serverApproveBillingEvent != null
|
||||||
|
|| serverApproveAutorenewEvent != null) {
|
||||||
serverApproveEntities = null;
|
serverApproveEntities = null;
|
||||||
postLoad();
|
postLoad();
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class ExpandRecurringBillingEventsActionTest
|
||||||
|
|
||||||
@Order(Order.DEFAULT - 2)
|
@Order(Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
public final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
public final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
private DomainBase domain;
|
private DomainBase domain;
|
||||||
private DomainHistory historyEntry;
|
private DomainHistory historyEntry;
|
||||||
|
|
|
@ -36,7 +36,7 @@ class ContactCheckFlowTest extends ResourceCheckFlowTestCase<ContactCheckFlow, C
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
ContactCheckFlowTest() {
|
ContactCheckFlowTest() {
|
||||||
setEppInput("contact_check.xml");
|
setEppInput("contact_check.xml");
|
||||||
|
|
|
@ -45,7 +45,7 @@ class ContactCreateFlowTest extends ResourceFlowTestCase<ContactCreateFlow, Cont
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
ContactCreateFlowTest() {
|
ContactCreateFlowTest() {
|
||||||
setEppInput("contact_create.xml");
|
setEppInput("contact_create.xml");
|
||||||
|
|
|
@ -66,7 +66,7 @@ class ContactDeleteFlowTest extends ResourceFlowTestCase<ContactDeleteFlow, Cont
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void initFlowTest() {
|
void initFlowTest() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class ContactInfoFlowTest extends ResourceFlowTestCase<ContactInfoFlow, ContactR
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
ContactInfoFlowTest() {
|
ContactInfoFlowTest() {
|
||||||
setEppInput("contact_info.xml");
|
setEppInput("contact_info.xml");
|
||||||
|
|
|
@ -54,7 +54,7 @@ class ContactTransferApproveFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class ContactTransferCancelFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -46,7 +46,7 @@ class ContactTransferQueryFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ContactTransferRejectFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -65,7 +65,7 @@ class ContactTransferRequestFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
ContactTransferRequestFlowTest() {
|
ContactTransferRequestFlowTest() {
|
||||||
// We need the transfer to happen at exactly this time in order for the response to match up.
|
// We need the transfer to happen at exactly this time in order for the response to match up.
|
||||||
|
|
|
@ -53,7 +53,7 @@ class ContactUpdateFlowTest extends ResourceFlowTestCase<ContactUpdateFlow, Cont
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
ContactUpdateFlowTest() {
|
ContactUpdateFlowTest() {
|
||||||
setEppInput("contact_update.xml");
|
setEppInput("contact_update.xml");
|
||||||
|
|
|
@ -93,7 +93,7 @@ class DomainCheckFlowTest extends ResourceCheckFlowTestCase<DomainCheckFlow, Dom
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
DomainCheckFlowTest() {
|
DomainCheckFlowTest() {
|
||||||
setEppInput("domain_check_one_tld.xml");
|
setEppInput("domain_check_one_tld.xml");
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class DomainClaimsCheckFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
DomainClaimsCheckFlowTest() {
|
DomainClaimsCheckFlowTest() {
|
||||||
setEppInput("domain_check_claims.xml");
|
setEppInput("domain_check_claims.xml");
|
||||||
|
|
|
@ -188,7 +188,7 @@ class DomainCreateFlowTest extends ResourceFlowTestCase<DomainCreateFlow, Domain
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
DomainCreateFlowTest() {
|
DomainCreateFlowTest() {
|
||||||
setEppInput("domain_create.xml", ImmutableMap.of("DOMAIN", "example.tld"));
|
setEppInput("domain_create.xml", ImmutableMap.of("DOMAIN", "example.tld"));
|
||||||
|
|
|
@ -119,7 +119,7 @@ class DomainDeleteFlowTest extends ResourceFlowTestCase<DomainDeleteFlow, Domain
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
private DomainBase domain;
|
private DomainBase domain;
|
||||||
private DomainHistory earlierHistoryEntry;
|
private DomainHistory earlierHistoryEntry;
|
||||||
|
|
|
@ -87,7 +87,7 @@ class DomainInfoFlowTest extends ResourceFlowTestCase<DomainInfoFlow, DomainBase
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The domain_info_fee.xml default substitutions common to most tests.
|
* The domain_info_fee.xml default substitutions common to most tests.
|
||||||
|
|
|
@ -112,7 +112,7 @@ class DomainRenewFlowTest extends ResourceFlowTestCase<DomainRenewFlow, DomainBa
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void initDomainTest() {
|
void initDomainTest() {
|
||||||
|
|
|
@ -90,7 +90,7 @@ class DomainRestoreRequestFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
private static final ImmutableMap<String, String> FEE_06_MAP =
|
private static final ImmutableMap<String, String> FEE_06_MAP =
|
||||||
ImmutableMap.of("FEE_VERSION", "0.6", "FEE_NS", "fee", "CURRENCY", "USD");
|
ImmutableMap.of("FEE_VERSION", "0.6", "FEE_NS", "fee", "CURRENCY", "USD");
|
||||||
|
|
|
@ -91,7 +91,7 @@ class DomainTransferApproveFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -71,7 +71,7 @@ class DomainTransferCancelFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -48,7 +48,7 @@ class DomainTransferQueryFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void beforeEach() {
|
void beforeEach() {
|
||||||
|
|
|
@ -73,7 +73,7 @@ class DomainTransferRejectFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void setUp() {
|
void setUp() {
|
||||||
|
|
|
@ -126,7 +126,7 @@ class DomainTransferRequestFlowTest
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
private static final ImmutableMap<String, String> BASE_FEE_MAP =
|
private static final ImmutableMap<String, String> BASE_FEE_MAP =
|
||||||
new ImmutableMap.Builder<String, String>()
|
new ImmutableMap.Builder<String, String>()
|
||||||
|
|
|
@ -120,7 +120,7 @@ class DomainUpdateFlowTest extends ResourceFlowTestCase<DomainUpdateFlow, Domain
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
@BeforeEach
|
@BeforeEach
|
||||||
void initDomainTest() {
|
void initDomainTest() {
|
||||||
|
|
|
@ -51,7 +51,7 @@ class PollAckFlowTest extends FlowTestCase<PollAckFlow> {
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
/** This is the message id being sent in the ACK request. */
|
/** This is the message id being sent in the ACK request. */
|
||||||
private static final long MESSAGE_ID = 3;
|
private static final long MESSAGE_ID = 3;
|
||||||
|
|
|
@ -58,7 +58,7 @@ class PollRequestFlowTest extends FlowTestCase<PollRequestFlow> {
|
||||||
|
|
||||||
@Order(value = Order.DEFAULT - 2)
|
@Order(value = Order.DEFAULT - 2)
|
||||||
@RegisterExtension
|
@RegisterExtension
|
||||||
final ReplayExtension replayExtension = ReplayExtension.createWithCompare(clock);
|
final ReplayExtension replayExtension = ReplayExtension.createWithDoubleReplay(clock);
|
||||||
|
|
||||||
private DomainBase domain;
|
private DomainBase domain;
|
||||||
private ContactResource contact;
|
private ContactResource contact;
|
||||||
|
|
Loading…
Add table
Reference in a new issue