forked from apache/dolphinscheduler
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[test-2559][e2e] test data configure isolation (apache#3712)
* Add task connection * Optimize test cases * Modify variable format * Optimize test cases * Update BrowserCommon.java * Update BrowserCommon.java * Update WorkflowDefineLocator.java * Optimize waiting time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize project wait time * Optimize wait time * Optimize wait time * open timing testcase * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize wait time * Optimize alert to save workflow * Optimize alert to save workflow * add yaml reader * add yaml file * [e2e] test data configure isolation * [e2e] test data configure isolation * [e2e] test data configure isolation * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify style AvoidStarImport * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style * [e2e] modify check code style Co-authored-by: chenxingchun <[email protected]>
- Loading branch information
1 parent
2f584f6
commit 42deff0
Showing
31 changed files
with
369 additions
and
312 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
45 changes: 45 additions & 0 deletions
45
e2e/src/main/java/org/apache/dolphinscheduler/util/YmlReader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one or more | ||
* contributor license agreements. See the NOTICE file distributed with | ||
* this work for additional information regarding copyright ownership. | ||
* The ASF licenses this file to You under the Apache License, Version 2.0 | ||
* (the "License"); you may not use this file except in compliance with | ||
* the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package org.apache.dolphinscheduler.util; | ||
|
||
import java.io.IOException; | ||
import java.io.InputStream; | ||
import java.util.HashMap; | ||
|
||
import org.ho.yaml.Yaml; | ||
import org.springframework.core.io.DefaultResourceLoader; | ||
import org.springframework.core.io.Resource; | ||
|
||
/** | ||
* read yml file | ||
*/ | ||
public class YmlReader { | ||
public static HashMap<String,HashMap<String, String>> map; | ||
public String getDataYml(String filePath, String key1, String key2) { | ||
Yaml yaml = new Yaml(); | ||
Resource resource = new DefaultResourceLoader().getResource("classpath:" + filePath + ".yml"); | ||
try { | ||
InputStream inputStream = resource.getInputStream(); | ||
map = yaml.loadType(inputStream, HashMap.class); | ||
} catch (IOException e) { | ||
e.printStackTrace(); | ||
} | ||
String data = map.get(key1).get(key2); | ||
return data; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,17 +16,12 @@ | |
*/ | ||
package org.apache.dolphinscheduler.data.project; | ||
|
||
public class RunWorkflowData { | ||
/** | ||
* run workflow data | ||
*/ | ||
//input shell task name | ||
public static final String RECIPIENT = "[email protected]"; | ||
|
||
//input shell task description | ||
public static final String Cc = "[email protected]"; | ||
|
||
public static final String RUN_WORKFLOW_TITLE = "工作流定义 - DolphinScheduler"; | ||
|
||
import org.apache.dolphinscheduler.util.YmlReader; | ||
|
||
public class RunWorkflowData { | ||
public String getRunWorkflowData(String param) { | ||
YmlReader ymlReader = new YmlReader(); | ||
String runWorkflowData = ymlReader.getDataYml("testData/workflow_zh_cn", "runWorkflow", param); | ||
return runWorkflowData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,23 +16,12 @@ | |
*/ | ||
package org.apache.dolphinscheduler.data.project; | ||
|
||
public class TimingData { | ||
/** | ||
* timing data | ||
*/ | ||
//input shell task name | ||
public static final String RECIPIENT = "[email protected]"; | ||
|
||
//input shell task description | ||
public static final String Cc = "[email protected]"; | ||
|
||
public static final String EDIT_RECIPIENT = "[email protected]"; | ||
|
||
public static final String EDIT_Cc = "[email protected]"; | ||
import org.apache.dolphinscheduler.util.YmlReader; | ||
|
||
public static final String TIMING_OFFLINE_STATE = "下线"; | ||
|
||
public static final String TIMING_ONLINE_STATE = "上线"; | ||
|
||
public static final String TIMING_TITLE = "定时任务列表 - DolphinScheduler"; | ||
public class TimingData { | ||
public String getTimingData(String param) { | ||
YmlReader ymlReader = new YmlReader(); | ||
String timingData = ymlReader.getDataYml("testData/workflow_zh_cn", "timing", param); | ||
return timingData; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.