You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2014/02/07 03:20:21 UTC

[2/3] git commit: Fixed flaky test GroupTest.GroupWatchWithSessionExpiration.

Fixed flaky test GroupTest.GroupWatchWithSessionExpiration.

This test became flaky due to a recent change in MESOS-935 that made
Group update watchers in expired(), this introduced a race condition
on the 'membership.get().cancelled()' Future (Group thread sets it
and the test thread reads it).

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


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

Branch: refs/heads/master
Commit: 1a7d4649b4b5467d5cb11f5c48ff0f6e7999e8d3
Parents: b42c25b
Author: Jiang Yan Xu <ya...@jxu.me>
Authored: Thu Feb 6 18:07:20 2014 -0800
Committer: Benjamin Mahler <bm...@twitter.com>
Committed: Thu Feb 6 18:09:27 2014 -0800

----------------------------------------------------------------------
 src/tests/group_tests.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1a7d4649/src/tests/group_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/group_tests.cpp b/src/tests/group_tests.cpp
index 5d4240c..b265bcb 100644
--- a/src/tests/group_tests.cpp
+++ b/src/tests/group_tests.cpp
@@ -192,7 +192,7 @@ TEST_F(GroupTest, GroupWatchWithSessionExpiration)
   AWAIT_READY(memberships);
   EXPECT_EQ(0u, memberships.get().size());
 
-  ASSERT_TRUE(membership.get().cancelled().isReady());
+  AWAIT_READY(membership.get().cancelled());
   ASSERT_FALSE(membership.get().cancelled().get());
 }