From f663f00251c59b09e0a870a12a0a41b15e3d5098 Mon Sep 17 00:00:00 2001 From: nickfelt Date: Thu, 2 Mar 2017 10:40:12 -0800 Subject: [PATCH] Add test and commentary for "phantom autorenew" in pendingDelete This documents some slightly spooky behavior around domains that have an expiration time within their pendingDelete window (meaning the whole period from DomainDeleteFlow running to the actual deletionTime, not just the 5-day pendingDelete grace period). They will experience an autorenew in terms of expiration time and grace period status due to cloneProjectedAtTime(), but without the usual artifacts of an autorenew (billing event and poll message). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=149019980 --- java/google/registry/flows/domain/DomainDeleteFlow.java | 4 ++++ .../google/registry/flows/domain/DomainDeleteFlowTest.java | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/java/google/registry/flows/domain/DomainDeleteFlow.java b/java/google/registry/flows/domain/DomainDeleteFlow.java index a1e698fbd..448a0a96c 100644 --- a/java/google/registry/flows/domain/DomainDeleteFlow.java +++ b/java/google/registry/flows/domain/DomainDeleteFlow.java @@ -155,6 +155,10 @@ public final class DomainDeleteFlow implements TransactionalFlow { now.plus(registry.getRedemptionGracePeriodLength()), clientId))) .setDeletePollMessage(Key.create(deletePollMessage)); + // Note: The expiration time is unchanged, so if it's before the new deletion time, there will + // be a "phantom autorenew" where the expiration time advances but no billing event or poll + // message are produced (since we are ending the autorenew recurrences at "now" below). For + // now at least this is working as intended. } DomainResource newDomain = builder.build(); updateForeignKeyIndexDeletionTime(newDomain); diff --git a/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java b/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java index 06059e31d..1dad39588 100644 --- a/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainDeleteFlowTest.java @@ -311,6 +311,7 @@ public class DomainDeleteFlowTest extends ResourceFlowTestCase