pavel-avilov commented on a change in pull request #16891:
URL: https://github.com/apache/beam/pull/16891#discussion_r815616195



##########
File path: playground/backend/internal/code_processing/code_processing_test.go
##########
@@ -212,26 +234,45 @@ func Test_Process(t *testing.T) {
                        args: args{
                                ctx:             context.Background(),
                                appEnv:          appEnvs,
-                               sdkEnv:          sdkEnv,
+                               sdkEnv:          sdkJavaEnv,
                                pipelineId:      uuid.New(),
                                pipelineOptions: "",
                        },
                },
                {
                        // Test case with calling processCode without any error 
cases.
                        // As a result status into cache should be set as 
Status_STATUS_FINISHED.
-                       name:                  "processing complete 
successfully",
+                       name:                  "Processing complete 
successfully on java sdk",
                        createExecFile:        true,
                        cancelFunc:            false,
-                       code:                  "class HelloWorld {\n    public 
static void main(String[] args) {\n        System.out.println(\"Hello 
world!\");\n    }\n}",
+                       code:                  helloWordJava,
                        expectedStatus:        pb.Status_STATUS_FINISHED,
                        expectedCompileOutput: "",
                        expectedRunOutput:     "Hello world!\n",
                        expectedRunError:      "",
                        args: args{
                                ctx:             context.Background(),
                                appEnv:          appEnvs,
-                               sdkEnv:          sdkEnv,
+                               sdkEnv:          sdkJavaEnv,
+                               pipelineId:      uuid.New(),
+                               pipelineOptions: "",
+                       },
+               },
+               {
+                       // Test case with calling processCode method with 
incorrect go code.
+                       // As a result status into cache should be set as 
Status_STATUS_PREPARATION_ERROR.
+                       name:                  "Prepare step failed",
+                       createExecFile:        true,
+                       code:                  "package main\nimport 
\"fmt\"\nfunc main() {\n    fmt.Println(\"hello world\").\n}\n",

Review comment:
       Moved to a variable, not to constant

##########
File path: playground/backend/internal/code_processing/code_processing_test.go
##########
@@ -61,16 +68,26 @@ func TestMain(m *testing.M) {
 
 func setup() {
        // create configs for java
-       err := os.MkdirAll("configs", fs.ModePerm)
+       err := os.MkdirAll(configFolder, fs.ModePerm)
        if err != nil {
                panic(err)
        }
-       filePath := filepath.Join("configs", pb.Sdk_SDK_JAVA.String()+".json")
+       filePath := filepath.Join(configFolder, 
pb.Sdk_SDK_JAVA.String()+".json")

Review comment:
       Done




-- 
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