You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/20 14:10:51 UTC

[GitHub] [beam] ilya-kozyrev commented on a change in pull request #16273: [BEAM-13478][Playground][Bugfix] Fix java unit test

ilya-kozyrev commented on a change in pull request #16273:
URL: https://github.com/apache/beam/pull/16273#discussion_r772388420



##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -123,27 +118,38 @@ func Process(ctx context.Context, cacheService cache.Cache, lc *fs_tool.LifeCycl
 		return
 	}
 
+	// Check if unit test
+	isUnitTest := false
+	validateIsUnitTest, ok := validationResults.Load(validators.UnitTestValidatorName)
+	if ok && validateIsUnitTest.(bool) {
+		isUnitTest = true
+	}
+
 	if sdkEnv.ApacheBeamSdk == pb.Sdk_SDK_PYTHON || (sdkEnv.ApacheBeamSdk == pb.Sdk_SDK_GO && isUnitTest) {

Review comment:
       ```suggestion
           // This condition is used for cases when the playground doesn't compile source files. For the Python code and the Go Unit Tests
   	if sdkEnv.ApacheBeamSdk == pb.Sdk_SDK_PYTHON || (sdkEnv.ApacheBeamSdk == pb.Sdk_SDK_GO && isUnitTest) {
   ```

##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -123,27 +118,38 @@ func Process(ctx context.Context, cacheService cache.Cache, lc *fs_tool.LifeCycl
 		return
 	}
 
+	// Check if unit test
+	isUnitTest := false
+	validateIsUnitTest, ok := validationResults.Load(validators.UnitTestValidatorName)
+	if ok && validateIsUnitTest.(bool) {
+		isUnitTest = true
+	}

Review comment:
       ```suggestion
   	validateIsUnitTest, _ := validationResults.Load(validators.UnitTestValidatorName)
   	isUnitTest := validateIsUnitTest.(bool)
   ```




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org