This is an automated email from the ASF dual-hosted git repository. zqr10159 pushed a commit to branch 2.0.0 in repository https://gitbox.apache.org/repos/asf/hertzbeat.git
commit 40e7485be1caf3a0e3a8b9b04ccaf241eefb1b6e Author: Logic <[email protected]> AuthorDate: Thu Aug 27 19:00:04 2026 +0800 Stabilize migration recovery timing test --- .../setup/workflow/DeploymentMigrationCommandRunnerRecoveryTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hertzbeat-manager/src/test/java/org/apache/hertzbeat/manager/setup/workflow/DeploymentMigrationCommandRunnerRecoveryTest.java b/hertzbeat-manager/src/test/java/org/apache/hertzbeat/manager/setup/workflow/DeploymentMigrationCommandRunnerRecoveryTest.java index 0dc198b6d3..c45d91cfa1 100644 --- a/hertzbeat-manager/src/test/java/org/apache/hertzbeat/manager/setup/workflow/DeploymentMigrationCommandRunnerRecoveryTest.java +++ b/hertzbeat-manager/src/test/java/org/apache/hertzbeat/manager/setup/workflow/DeploymentMigrationCommandRunnerRecoveryTest.java @@ -65,12 +65,14 @@ class DeploymentMigrationCommandRunnerRecoveryTest { FileMigrationOperationStore store = new FileMigrationOperationStore(root.resolve("timeout")); RetainedCutoverCoordinator coordinator = mock(RetainedCutoverCoordinator.class); CountDownLatch allowPreparation = new CountDownLatch(1); + CountDownLatch preparationPublished = new CountDownLatch(1); AtomicInteger executions = new AtomicInteger(); when(coordinator.execute(any(), any(), any(), any(), any(), any(), any())) .thenAnswer(invocation -> { executions.incrementAndGet(); assertThat(allowPreparation.await(5, SECONDS)).isTrue(); prepare(invocation); + preparationPublished.countDown(); return retained(); }); DeploymentMigrationCommandRunner runner = runner( @@ -83,6 +85,7 @@ class DeploymentMigrationCommandRunnerRecoveryTest { assertThat(runner.activeOperationId()).contains(OPERATION); allowPreparation.countDown(); + assertThat(preparationPublished.await(5, SECONDS)).isTrue(); MigrationViewAssert.running(runner.start(request())); assertThat(executions).hasValue(1); } finally { --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
