mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Bannier <benjamin.bann...@mesosphere.io>
Subject Review Request 54205: Improved equality check in SlaveTest.StateEndpoint.
Date Wed, 30 Nov 2016 12:41:52 GMT

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

Review request for mesos, Joseph Wu and Till Toenshoff.


Bugs: MESOS-4695
    https://issues.apache.org/jira/browse/MESOS-4695


Repository: mesos


Description
-------

This test was checking two floating point values for equality by only
examining their integer part. Since one of the values went through
a number of conversions, even its integer part could have changed for
certain starting values.

This patch introduces an epsilon into the comparison to account for
possible changes in the integer part.


Diffs
-----

  src/tests/slave_tests.cpp 3d06c3a4a74bbcba4c9b6bdba4258c5aefdab845 

Diff: https://reviews.apache.org/r/54205/diff/


Testing
-------

`make check` passes.

I was not able to make this test fail even without the fix. After the fix it continued to
work for me, even for a large number of test iterations.


Thanks,

Benjamin Bannier


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message