Repository: mesos
Updated Branches:
  refs/heads/master 11538e417 -> 7adf32fc1


Fixed flaky `SlaveTest.ContainersEndpoint` test.


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

Branch: refs/heads/master
Commit: 7adf32fc15d3d15da2d55a610f1c402063c2147d
Parents: 11538e4
Author: Alexander Rukletsov <al...@apache.org>
Authored: Thu Nov 2 20:26:01 2017 +0100
Committer: Alexander Rukletsov <al...@apache.org>
Committed: Thu Nov 2 20:43:28 2017 +0100

----------------------------------------------------------------------
 src/tests/slave_tests.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/7adf32fc/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index aae5e60..9c2db7a 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -2759,9 +2759,11 @@ TEST_F(SlaveTest, ContainersEndpoint)
   EXPECT_CALL(containerizer, usage(_))
     .WillOnce(Return(statistics1));
 
-  // Will be called once during the second request.
+  // Will be called once during the second request and might be called if
+  // the `TASK_FAILED` update reaches the agent before the test finishes.
   EXPECT_CALL(containerizer, status(_))
-    .WillOnce(Return(containerStatus1));
+    .WillOnce(Return(containerStatus1))
+    .WillRepeatedly(Return(containerStatus1));
 
   {
     Future<Response> response = process::http::get(

Reply via email to