You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Avinash sridharan <av...@mesosphere.io> on 2015/12/08 00:01:04 UTC

Re: Review Request 40732: Enabling ResourcesTest.Precision


> On Nov. 26, 2015, 3:48 p.m., Klaus Ma wrote:
> > src/tests/resources_tests.cpp, line 1534
> > <https://reviews.apache.org/r/40732/diff/1/?file=1147238#file1147238line1534>
> >
> >     We can not change this to `EXPECT_DOUBLE_EQ` because it's used to check `operator==` in `Resources`. I think we can check the source code of `CHECK_NEAR` and re-use it in `Scalar::operator==`.

Maybe I am getting this wrong but in TEST(ResourcesTest, Precision) I thought we are explicitly checking cpu resources which are set to double? Hence the change to EXPECT_DOUBLE_EQ


- Avinash


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/40732/#review108150
-----------------------------------------------------------


On Nov. 26, 2015, 6:52 a.m., Avinash sridharan wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/40732/
> -----------------------------------------------------------
> 
> (Updated Nov. 26, 2015, 6:52 a.m.)
> 
> 
> Review request for mesos, Bernd Mathiske, Klaus Ma, and Neil Conway.
> 
> 
> Bugs: MESOS-3552
>     https://issues.apache.org/jira/browse/MESOS-3552
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This is an existing test case to check precision of resource reservations, but would have always failed due to double precision errors. Forcing the test case to use EXPECT_DOUBE_EQ instead of EXPECT_EQ (strict equality)
> 
> 
> Diffs
> -----
> 
>   src/tests/resources_tests.cpp dbd39cd5a6786682a7b528b6fea37ab78904cf12 
> 
> Diff: https://reviews.apache.org/r/40732/diff/
> 
> 
> Testing
> -------
> 
> Ran make check against 40730
> 
> 
> Thanks,
> 
> Avinash sridharan
> 
>