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: [email protected]
For additional commands, e-mail: [email protected]