mesos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vinodk...@apache.org
Subject git commit: Advanced clock to ensure GarbageCollector prune runs in test.
Date Wed, 21 May 2014 22:20:30 GMT
Repository: mesos
Updated Branches:
  refs/heads/master 4d5ed7a72 -> f9ff5f958


Advanced clock to ensure GarbageCollector prune runs in test.

Review: https://reviews.apache.org/r/21782


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f9ff5f95
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f9ff5f95
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f9ff5f95

Branch: refs/heads/master
Commit: f9ff5f958fc19dcaae020830650ed28757cea6a4
Parents: 4d5ed7a
Author: Dominic Hamon <dhamon@twopensource.com>
Authored: Wed May 21 15:14:29 2014 -0700
Committer: Vinod Kone <vinod@twitter.com>
Committed: Wed May 21 15:20:23 2014 -0700

----------------------------------------------------------------------
 src/tests/gc_tests.cpp | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f9ff5f95/src/tests/gc_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/gc_tests.cpp b/src/tests/gc_tests.cpp
index 19648fd..df15746 100644
--- a/src/tests/gc_tests.cpp
+++ b/src/tests/gc_tests.cpp
@@ -641,6 +641,13 @@ TEST_F(GarbageCollectorIntegrationTest, DiskUsage)
 
   Clock::settle(); // Wait for GarbageCollectorProcess::schedule to complete.
 
+  // We advance the clock here so that the 'removalTime' of the
+  // executor directory is definitely less than 'flags.gc_delay' in
+  // the GarbageCollectorProcess 'GarbageCollector::prune()' gets
+  // called (below). Otherwise, due to double comparison precision
+  // in 'prune()' the directory might not be deleted.
+  Clock::advance(Seconds(1));
+
   Future<Nothing> _checkDiskUsage =
     FUTURE_DISPATCH(_, &Slave::_checkDiskUsage);
 


Mime
View raw message