ailiujiarui commented on code in PR #16542:
URL: 
https://github.com/apache/dolphinscheduler/pull/16542#discussion_r1828915698


##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/WorkflowJavaTaskE2ETest.java:
##########
@@ -70,16 +97,110 @@ public class WorkflowJavaTaskE2ETest {
 
     private static final String environmentWorkerGroup = "default";
 
-    private static final String javaContent = "public class Test {" +
-            "    public static void main(String[] args) {" +
-            "        System.out.println(\"hello world\");" +
-            "    }" +
-            "}";
+    private static final String filePath = "/tmp";
 
     private static RemoteWebDriver browser;
 
+    private static void createJar(String className, String classFilePath, 
String entryName, String mainPackage,
+                                  String jarName) {
+
+        String jarFilePath = "/tmp/" + jarName;
+
+        Manifest manifest = new Manifest();
+        manifest.getMainAttributes().put(Attributes.Name.MANIFEST_VERSION, 
"1.0");
+        manifest.getMainAttributes().put(Attributes.Name.MAIN_CLASS, 
mainPackage);
+
+        try (
+                FileOutputStream fos = new FileOutputStream(jarFilePath);
+                JarOutputStream jos = new JarOutputStream(fos, manifest)) {
+            Path path = new File(classFilePath + className).toPath();
+            JarEntry entry = new JarEntry(entryName);
+            jos.putNextEntry(entry);
+            byte[] bytes = Files.readAllBytes(path);
+            jos.write(bytes, 0, bytes.length);
+            jos.closeEntry();
+        } catch (IOException e) {
+            log.error("create jar failed:", e);
+        }
+
+    }
+    private static void getJar() {

Review Comment:
   Has been modified



##########
dolphinscheduler-e2e/dolphinscheduler-e2e-case/src/test/java/org/apache/dolphinscheduler/e2e/cases/WorkflowJavaTaskE2ETest.java:
##########
@@ -121,35 +247,47 @@ public static void cleanup() {
 
     @Test
     @Order(1)
-    void testCreateWorkflow() {
-        WorkflowDefinitionTab workflowDefinitionPage =
-                new ProjectPage(browser)
-                        .goTo(project)
-                        .goToTab(WorkflowDefinitionTab.class);
+    void testCreateFatWorkflow() {

Review Comment:
   Has been modified



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to