You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ga...@apache.org on 2022/10/31 07:25:59 UTC
[incubator-seatunnel] branch dev updated: [Hotfix][e2e] fix JobRestoreWhenMasterNodeSwitch method NPE (#3237)
This is an automated email from the ASF dual-hosted git repository.
gaojun2048 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 0e8351d56 [Hotfix][e2e] fix JobRestoreWhenMasterNodeSwitch method NPE (#3237)
0e8351d56 is described below
commit 0e8351d56facf36681ea001594d0855156350ccc
Author: TaoZex <45...@users.noreply.github.com>
AuthorDate: Mon Oct 31 15:25:52 2022 +0800
[Hotfix][e2e] fix JobRestoreWhenMasterNodeSwitch method NPE (#3237)
* [Hotfix][e2e] fix JobRestoreWhenMasterNodeSwitch method NPE
---
.../apache/seatunnel/engine/server/CoordinatorServiceTest.java | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/CoordinatorServiceTest.java b/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/CoordinatorServiceTest.java
index 2f11954c3..564253d5f 100644
--- a/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/CoordinatorServiceTest.java
+++ b/seatunnel-engine/seatunnel-engine-server/src/test/java/org/apache/seatunnel/engine/server/CoordinatorServiceTest.java
@@ -153,14 +153,18 @@ public class CoordinatorServiceTest {
}
});
- // wait job restore
- Thread.sleep(5000);
+ // wait job restore and leave running status
+ await().atMost(200000, TimeUnit.MILLISECONDS)
+ .untilAsserted(
+ () -> Assertions.assertNotEquals(PipelineStatus.RUNNING,
+ server2.getCoordinatorService().getJobMaster(jobId).getPhysicalPlan().getPipelineList().get(0)
+ .getPipelineState()));
// pipeline will recovery running state
await().atMost(200000, TimeUnit.MILLISECONDS)
.untilAsserted(
() -> Assertions.assertEquals(PipelineStatus.RUNNING,
- server2.getCoordinatorService().getJobMaster(jobId).getPhysicalPlan().getPipelineList().get(0)
+ server2.getCoordinatorService().getJobMaster(jobId).getPhysicalPlan().getPipelineList().get(0)
.getPipelineState()));
server2.getCoordinatorService().cancelJob(jobId);