You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@yunikorn.apache.org by "Wilfred Spiegelenburg (Jira)" <ji...@apache.org> on 2023/06/26 04:16:00 UTC
[jira] [Resolved] (YUNIKORN-1403) CalculateAbsUsedCapacity: overflow unit tests
[ https://issues.apache.org/jira/browse/YUNIKORN-1403?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wilfred Spiegelenburg resolved YUNIKORN-1403.
---------------------------------------------
Fix Version/s: 1.4.0
Resolution: Fixed
Changes committed, thank you for your contribution [~simon1000010]
> CalculateAbsUsedCapacity: overflow unit tests
> ---------------------------------------------
>
> Key: YUNIKORN-1403
> URL: https://issues.apache.org/jira/browse/YUNIKORN-1403
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: core - common, test - unit
> Reporter: Wilfred Spiegelenburg
> Assignee: Simon Blessenohl
> Priority: Major
> Labels: newbie, pull-request-available
> Fix For: 1.4.0
>
>
> CalculateAbsUsedCapacity is guarded against positive and negative overflow. The postive case is unit tested. The negative case is not unit tested.
> Need to add a test case for te negative side:
> {code}
> // protect against negative integer overflow
> if absResValue > 0 && div < 0 {
> {code}
--
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