From aab04f9b77aa288ff0e6f19bbf759ecbceecfa70 Mon Sep 17 00:00:00 2001 From: gbrodman Date: Fri, 3 Sep 2021 07:39:55 -0600 Subject: [PATCH] Add RetryingTest annotation to flaky RDE test (#1306) I'm not sure why this test is failing. It's failing saying that the listObjects call is failing to include "soy_2000-01-01_thin_S1_R1.xml.ghostryde" in the results, however the verifyFiles method that we call right beforehand verifies that file and its contents --- .../java/google/registry/beam/rde/RdePipelineTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java b/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java index 233d8a319..0f5b5e33f 100644 --- a/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java +++ b/core/src/test/java/google/registry/beam/rde/RdePipelineTest.java @@ -91,6 +91,7 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.RegisterExtension; +import org.junitpioneer.jupiter.RetryingTest; /** Unit tests for {@link RdePipeline}. */ public class RdePipelineTest { @@ -288,7 +289,8 @@ public class RdePipelineTest { pipeline.run().waitUntilFinish(); } - @Test + // The GCS folder listing can be a bit flaky, so retry if necessary + @RetryingTest(4) void testSuccess_persistData() throws Exception { PendingDeposit brdaKey = PendingDeposit.create("soy", now, THIN, CursorType.BRDA, Duration.standardDays(1)); @@ -314,7 +316,8 @@ public class RdePipelineTest { assertThat(loadRevision(now, FULL)).isEqualTo(1); } - @Test + // The GCS folder listing can be a bit flaky, so retry if necessary + @RetryingTest(4) void testSuccess_persistData_manual() throws Exception { PendingDeposit brdaKey = PendingDeposit.createInManualOperation("soy", now, THIN, "test/", 0); PendingDeposit rdeKey = PendingDeposit.createInManualOperation("soy", now, FULL, "test/", 0);