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

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

                Author: ASF GitHub Bot
            Created on: 10/Jan/22 15:59
            Start Date: 10/Jan/22 15:59
    Worklog Time Spent: 10m 
      Work Description: KhaninArtur commented on a change in pull request 
#16469:
URL: https://github.com/apache/beam/pull/16469#discussion_r781320645



##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -189,8 +189,13 @@ func Process(ctx context.Context, cacheService 
cache.Cache, lc *fs_tool.LifeCycl
                return
        }
        if !ok {
-               if runOutput.Error != nil {
-                       runError.Write([]byte(runOutput.Error.Error()))
+               // If unit test has some error then error output is placed as 
RunOutput
+               if isUnitTest {
+                       output, err := GetProcessingOutput(ctx, cacheService, 
pipelineId, cache.RunOutput, "")
+                       if err == nil {
+                               runError.Write([]byte(output))
+                       }

Review comment:
       Don't we need to process this `err` if it is not `nil`?

##########
File path: playground/backend/internal/code_processing/code_processing.go
##########
@@ -189,8 +189,13 @@ func Process(ctx context.Context, cacheService 
cache.Cache, lc *fs_tool.LifeCycl
                return
        }
        if !ok {
-               if runOutput.Error != nil {
-                       runError.Write([]byte(runOutput.Error.Error()))
+               // If unit test has some error then error output is placed as 
RunOutput
+               if isUnitTest {

Review comment:
       Shouldn't we add an `else` case to do this?
   ```go
   if runOutput.Error != nil {
        runError.Write([]byte(runOutput.Error.Error()))
   ```




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

> [Playground] During unit tests failing there is no any output
> -------------------------------------------------------------
>
>                 Key: BEAM-13623
>                 URL: https://issues.apache.org/jira/browse/BEAM-13623
>             Project: Beam
>          Issue Type: Bug
>          Components: beam-playground
>            Reporter: Aydar Zaynutdinov
>            Assignee: Aydar Zaynutdinov
>            Priority: P3
>              Labels: beam-playground-backend
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> Run some unit test that contains an error on the Playground.
> {*}Expected result{*}: there is an error output.
> {*}Actual result{*}: there is no error output.



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

Reply via email to