Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit64d8d0e

Browse files
committed
Add IT case
1 parent82533fb commit64d8d0e

File tree

2 files changed

+105
-0
lines changed

2 files changed

+105
-0
lines changed

‎dolphinscheduler-master/src/test/java/org/apache/dolphinscheduler/server/master/integration/cases/WorkflowStartTestCase.java‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,30 @@ public void testStartWorkflow_with_oneSuccessTaskDryRun() {
124124
masterContainer.assertAllResourceReleased();
125125
}
126126

127+
@Test
128+
@DisplayName("Test start a workflow with two fake task(A) has the same name")
129+
publicvoidtestStartWorkflow_contains_duplicateTaskName() {
130+
finalStringyaml ="/it/start/workflow_with_duplicate_task_name.yaml";
131+
finalWorkflowTestCaseContextcontext =workflowTestCaseContextFactory.initializeContextFromYaml(yaml);
132+
finalWorkflowDefinitionworkflow =context.getOneWorkflow();
133+
134+
finalWorkflowOperator.WorkflowTriggerDTOworkflowTriggerDTO =WorkflowOperator.WorkflowTriggerDTO.builder()
135+
.workflowDefinition(workflow)
136+
.runWorkflowCommandParam(newRunWorkflowCommandParam())
137+
.build();
138+
finalIntegerworkflowInstanceId =workflowOperator.manualTriggerWorkflow(workflowTriggerDTO);
139+
140+
await()
141+
.atMost(Duration.ofMinutes(1))
142+
.untilAsserted(() -> {
143+
assertThat(repository.queryWorkflowInstance(workflowInstanceId).getState())
144+
.isEqualTo(WorkflowExecutionStatus.FAILURE);
145+
assertThat(repository.queryTaskInstance(workflowInstanceId)).isEmpty();
146+
});
147+
148+
masterContainer.assertAllResourceReleased();
149+
}
150+
127151
@Test
128152
@DisplayName("Test start a workflow with one fake task(A) using serial wait strategy")
129153
publicvoidtestStartWorkflow_with_serialWaitStrategy() {
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
project:
19+
name:MasterIntegrationTest
20+
code:1
21+
description:This is a fake project
22+
userId:1
23+
userName:admin
24+
createTime:2024-08-12 00:00:00
25+
updateTime:2021-08-12 00:00:00
26+
27+
workflows:
28+
-name:workflow_with_duplicate_task_name
29+
code:1
30+
version:1
31+
projectCode:1
32+
description:This is a fake workflow with two parallel failed tasks
33+
releaseState:ONLINE
34+
createTime:2024-08-12 00:00:00
35+
updateTime:2021-08-12 00:00:00
36+
userId:1
37+
executionType:PARALLEL
38+
39+
tasks:
40+
-name:A
41+
code:1
42+
version:1
43+
projectCode:1
44+
userId:1
45+
taskType:LogicFakeTask
46+
taskParams:'{"localParams":null,"varPool":[],"shellScript":"sleep 5"}'
47+
workerGroup:default
48+
createTime:2024-08-12 00:00:00
49+
updateTime:2021-08-12 00:00:00
50+
taskExecuteType:BATCH
51+
-name:A
52+
code:2
53+
version:1
54+
projectCode:1
55+
userId:1
56+
taskType:LogicFakeTask
57+
taskParams:'{"localParams":null,"varPool":[],"shellScript":"sleep 5"}'
58+
workerGroup:default
59+
createTime:2024-08-12 00:00:00
60+
updateTime:2021-08-12 00:00:00
61+
taskExecuteType:BATCH
62+
63+
taskRelations:
64+
-projectCode:1
65+
workflowDefinitionCode:1
66+
workflowDefinitionVersion:1
67+
preTaskCode:0
68+
preTaskVersion:0
69+
postTaskCode:1
70+
postTaskVersion:1
71+
createTime:2024-08-12 00:00:00
72+
updateTime:2024-08-12 00:00:00
73+
-projectCode:1
74+
workflowDefinitionCode:1
75+
workflowDefinitionVersion:1
76+
preTaskCode:0
77+
preTaskVersion:0
78+
postTaskCode:2
79+
postTaskVersion:1
80+
createTime:2024-08-12 00:00:00
81+
updateTime:2024-08-12 00:00:00

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp