[ 
https://issues.apache.org/jira/browse/BEAM-13478?focusedWorklogId=697924&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-697924
 ]

ASF GitHub Bot logged work on BEAM-13478:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 17/Dec/21 14:38
            Start Date: 17/Dec/21 14:38
    Worklog Time Spent: 10m 
      Work Description: AydarZaynutdinov commented on a change in pull request 
#16273:
URL: https://github.com/apache/beam/pull/16273#discussion_r771437886



##########
File path: playground/backend/internal/environment/environment_service.go
##########
@@ -173,9 +174,13 @@ func createExecutorConfig(apacheBeamSdk pb.Sdk, configPath 
string) (*ExecutorCon
        }
        switch apacheBeamSdk {
        case pb.Sdk_SDK_JAVA:
-               executorConfig.CompileArgs = append(executorConfig.CompileArgs, 
getEnv(beamPathKey, defaultBeamJarsPath))
-               executorConfig.RunArgs[1] = fmt.Sprintf("%s%s", 
executorConfig.RunArgs[1], getEnv(beamPathKey, defaultBeamJarsPath))
-               executorConfig.TestArgs[1] = fmt.Sprintf("%s%s", 
executorConfig.TestArgs[1], getEnv(beamPathKey, defaultBeamJarsPath))
+               args, err := concatBeamJarsToString()
+               if err != nil {
+                       return nil, err

Review comment:
       Need to add some log here or in `concatBeamJarsToString()` method

##########
File path: playground/backend/internal/fs_tool/fs_test.go
##########
@@ -303,7 +303,7 @@ func TestLifeCycle_GetAbsoluteExecutableFilePath(t 
*testing.T) {
        baseFileFolder := fmt.Sprintf("%s_%s", baseFileFolder, pipelineId)
        srcFileFolder := baseFileFolder + "/src"
 
-       filePath := fmt.Sprintf("%s/%s", srcFileFolder, 
pipelineId.String()+javaSourceFileExtension)
+       filePath := fmt.Sprintf("%s/%s", srcFileFolder, 
pipelineId.String()+JavaSourceFileExtension)

Review comment:
       ```suggestion
        filePath := filepath.Join(srcFileFolder, fmt.Sprintf("%s%s", 
pipelineId.String(), JavaSourceFileExtension))
   ```

##########
File path: playground/backend/internal/preparators/go_preparators.go
##########
@@ -51,16 +54,15 @@ func formatCode(args ...interface{}) error {
        return nil
 }
 
-func changeFileName(args ...interface{}) error {
+func changeGoTestFileName(args ...interface{}) error {
        filePath := args[0].(string)
-       isUnitTest := args[1].(bool)
-       if isUnitTest {
+       validationResults := args[1].(*sync.Map)
+       isUnitTest, ok := 
validationResults.Load(validators.UnitTestValidatorName)
+       if ok && isUnitTest.(bool) {
                testFileName := fmt.Sprintf("%s_test.%s", 
strings.Split(filePath, sep)[0], goName)
-               cmd := exec.Command(mvCmd, filePath, testFileName)
-               fmt.Println(cmd.String())
-               stdout, err := cmd.CombinedOutput()
+               err := os.Rename(filePath, testFileName)
                if err != nil {
-                       return errors.New(string(stdout))
+                       return err

Review comment:
       Maybe add some log here?




-- 
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: 697924)
    Time Spent: 0.5h  (was: 20m)

> [Playground] Unit tests don't work for Java, need change main JUnit class
> -------------------------------------------------------------------------
>
>                 Key: BEAM-13478
>                 URL: https://issues.apache.org/jira/browse/BEAM-13478
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-playground
>            Reporter: Daria Malkova
>            Assignee: Daria Malkova
>            Priority: P3
>              Labels: beam-playground-backend
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to