mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 19:21:10 +01:00
Allow unit test duration to be submitted as a float or an int
Summary: Fixes T8736. It's OK for duration to be something that comes out of JSON as an int, like `1`. Test Plan: Will make @hach-que verify. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley, hach-que Maniphest Tasks: T8736 Differential Revision: https://secure.phabricator.com/D13531
This commit is contained in:
parent
6a996d76fd
commit
9623f9b5cf
1 changed files with 2 additions and 2 deletions
|
@ -30,7 +30,7 @@ final class HarbormasterBuildUnitMessage
|
|||
'namespace' => 'optional string',
|
||||
'name' => 'string',
|
||||
'result' => 'string',
|
||||
'duration' => 'optional float',
|
||||
'duration' => 'optional float|int',
|
||||
'path' => 'optional string',
|
||||
'coverage' => 'optional map<string, wild>',
|
||||
);
|
||||
|
@ -44,7 +44,7 @@ final class HarbormasterBuildUnitMessage
|
|||
$obj->setNamespace(idx($dict, 'namespace', ''));
|
||||
$obj->setName($dict['name']);
|
||||
$obj->setResult($dict['result']);
|
||||
$obj->setDuration(idx($dict, 'duration'));
|
||||
$obj->setDuration((float)idx($dict, 'duration'));
|
||||
|
||||
$path = idx($dict, 'path');
|
||||
if (strlen($path)) {
|
||||
|
|
Loading…
Reference in a new issue