From 1e218d1d5bf777a32dba89b49a09337670d7dbb2 Mon Sep 17 00:00:00 2001 From: weiminyu Date: Wed, 16 Jan 2019 10:49:12 -0800 Subject: [PATCH] Delete entity synchronously in test method setup Observed in Gradle test when it seems that the mutating command is executed before deletion has taken effect. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=229585754 --- javatests/google/registry/tools/MutatingCommandTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/javatests/google/registry/tools/MutatingCommandTest.java b/javatests/google/registry/tools/MutatingCommandTest.java index 928d023b7..e8247f843 100644 --- a/javatests/google/registry/tools/MutatingCommandTest.java +++ b/javatests/google/registry/tools/MutatingCommandTest.java @@ -114,7 +114,7 @@ public class MutatingCommandTest { @Test public void testSuccess_create() throws Exception { - ofy().deleteWithoutBackup().entities(Arrays.asList(host1, host2, registrar1, registrar2)); + ofy().deleteWithoutBackup().entities(Arrays.asList(host1, host2, registrar1, registrar2)).now(); MutatingCommand command = new MutatingCommand() { @Override protected void init() {