[
https://issues.apache.org/jira/browse/BEAM-13872?focusedWorklogId=733741&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-733741
]
ASF GitHub Bot logged work on BEAM-13872:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 28/Feb/22 06:46
Start Date: 28/Feb/22 06:46
Worklog Time Spent: 10m
Work Description: 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 733741)
Time Spent: 1h 40m (was: 1.5h)
> [Playground] Increase test coverage for the code_processing package
> -------------------------------------------------------------------
>
> Key: BEAM-13872
> URL: https://issues.apache.org/jira/browse/BEAM-13872
> Project: Beam
> Issue Type: Sub-task
> Components: beam-playground
> Reporter: Aydar Zaynutdinov
> Assignee: Pavel Avilov
> Priority: P3
> Labels: beam-playground-backend
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> Need to add unit tests to increase test coverage for the _code_processing_
> package.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)