Repository: mesos Updated Branches: refs/heads/master ce7bb6e23 -> 972a4cf17
Changed the XFS container kill test to use ASSERT_GE. Since disk resource sizes are truncated down to the nearest megabyte, we can often get a resource limitation claiming that 1MB was used even though the container actually used between 1MB and 2MB. Review: https://reviews.apache.org/r/67116/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/972a4cf1 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/972a4cf1 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/972a4cf1 Branch: refs/heads/master Commit: 972a4cf17db8b02fa3faf57d54e206878258546a Parents: ce7bb6e Author: Harold Dost <[email protected]> Authored: Tue May 15 09:30:07 2018 -0700 Committer: James Peach <[email protected]> Committed: Tue May 15 10:14:30 2018 -0700 ---------------------------------------------------------------------- src/tests/containerizer/xfs_quota_tests.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/972a4cf1/src/tests/containerizer/xfs_quota_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/containerizer/xfs_quota_tests.cpp b/src/tests/containerizer/xfs_quota_tests.cpp index 3431c1c..bee0c2d 100644 --- a/src/tests/containerizer/xfs_quota_tests.cpp +++ b/src/tests/containerizer/xfs_quota_tests.cpp @@ -615,7 +615,10 @@ TEST_F(ROOT_XFS_QuotaTest, DiskUsageExceedsQuotaWithKill) // the task used more than the 1MB in its resources, we are happy. EXPECT_EQ(1u, limit.size()); ASSERT_SOME(limit.disk()); - EXPECT_GT(limit.disk().get(), Megabytes(1)); + + // Currently the disk() function performs a static cast to uint64 so + // fractional Megabytes are truncated. + EXPECT_GE(limit.disk().get(), Megabytes(1)); driver.stop(); driver.join();
