You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Chia-Ping Tsai (Jira)" <ji...@apache.org> on 2024/03/19 08:10:00 UTC

[jira] [Created] (YUNIKORN-2499) MockResponseWriter#write should merge new bytes with older one

Chia-Ping Tsai created YUNIKORN-2499:
----------------------------------------

             Summary: MockResponseWriter#write should merge new bytes with older one
                 Key: YUNIKORN-2499
                 URL: https://issues.apache.org/jira/browse/YUNIKORN-2499
             Project: Apache YuniKorn
          Issue Type: Bug
            Reporter: Chia-Ping Tsai


I notice this issue when reviewing [https://github.com/apache/yunikorn-core/pull/757]

Normally, we call `write` only once to output the json data, and hence the mock response work well. However, the gzip writer will call the writer multi-times to complete the write with zip footer... and so the mock response can't work with the new use case.

[https://github.com/apache/yunikorn-core/blob/master/pkg/webservice/handler_mock_test.go#L46]

I feel that can be one-line fix.

trw.outputBytes = append(trw.outputBytes, bytes...)
 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@yunikorn.apache.org
For additional commands, e-mail: dev-help@yunikorn.apache.org