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/25 06:08:00 UTC
[jira] [Resolved] (YUNIKORN-2499) MockResponseWriter#write should merge new bytes with older one
[ https://issues.apache.org/jira/browse/YUNIKORN-2499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chia-Ping Tsai resolved YUNIKORN-2499.
--------------------------------------
Fix Version/s: 1.6.0
Resolution: Fixed
> 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
> Assignee: JiaChi Wang
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.6.0
>
>
> 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