From 6f9b039e72a90330e9c7cb3f3349fba2d0844adc Mon Sep 17 00:00:00 2001 From: kak Date: Tue, 17 Oct 2017 05:57:48 -0700 Subject: [PATCH] =?UTF-8?q?Migrates=20users=20from=20the=20unitless,=20amb?= =?UTF-8?q?iguous=20plus(long)=20and=20minus(long)=20methods=20on=20variou?= =?UTF-8?q?s=20Joda-Time=20APIs=20to=20their=20Duration-accepting=20overlo?= =?UTF-8?q?ads.=20=E2=80=8B=20This=20makes=20the=20units=20explicit,=20whi?= =?UTF-8?q?ch=20prevents=20confusion=20and=20bugs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit More information: [] Tested: TAP --sample for global presubmit queue [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=172455602 --- .../registry/flows/domain/DomainCreateFlowTest.java | 2 +- javatests/google/registry/model/EppResourceUtilsTest.java | 2 +- javatests/google/registry/tools/CreateTldCommandTest.java | 5 ++++- javatests/google/registry/tools/UpdateTldCommandTest.java | 8 ++++++-- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java index fd2c6d48f..514fce144 100644 --- a/javatests/google/registry/flows/domain/DomainCreateFlowTest.java +++ b/javatests/google/registry/flows/domain/DomainCreateFlowTest.java @@ -154,7 +154,7 @@ public class DomainCreateFlowTest extends ResourceFlowTestCase { IllegalArgumentException.class, "Don't pass both --initial_tld_state and --tld_state_transitions"); runCommandForced( - String.format("--tld_state_transitions=%s=PREDELEGATION,%s=SUNRISE", now, now.plus(1)), + String.format( + "--tld_state_transitions=%s=PREDELEGATION,%s=SUNRISE", + now, now.plus(Duration.millis(1))), "--initial_tld_state=GENERAL_AVAILABILITY", "--dns_writers=VoidDnsWriter", "xn--q9jyb4c"); diff --git a/javatests/google/registry/tools/UpdateTldCommandTest.java b/javatests/google/registry/tools/UpdateTldCommandTest.java index cf2066913..5cb945252 100644 --- a/javatests/google/registry/tools/UpdateTldCommandTest.java +++ b/javatests/google/registry/tools/UpdateTldCommandTest.java @@ -530,7 +530,9 @@ public class UpdateTldCommandTest extends CommandTestCase { thrown.expect( ParameterException.class, "not formatted correctly or has transition times out of order"); runCommandForced( - String.format("--tld_state_transitions=%s=PREDELEGATION,%s=SUNRISE", now, now.minus(1)), + String.format( + "--tld_state_transitions=%s=PREDELEGATION,%s=SUNRISE", + now, now.minus(Duration.millis(1))), "xn--q9jyb4c"); } @@ -630,7 +632,9 @@ public class UpdateTldCommandTest extends CommandTestCase { thrown.expect( ParameterException.class, "not formatted correctly or has transition times out of order"); runCommandForced( - String.format("--renew_billing_cost_transitions=\"%s=USD 1,%s=USD 2\"", now, now.minus(1)), + String.format( + "--renew_billing_cost_transitions=\"%s=USD 1,%s=USD 2\"", + now, now.minus(Duration.millis(1))), "xn--q9jyb4c"); }