You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2013/04/24 22:58:11 UTC
svn commit: r1471671 - in /incubator/mesos/trunk/src/tests: gc_tests.cpp
isolator_tests.cpp log_tests.cpp utils.hpp
Author: benh
Date: Wed Apr 24 20:58:11 2013
New Revision: 1471671
URL: http://svn.apache.org/r1471671
Log:
Missed refactors for new testing abstractions after rebase.
Modified:
incubator/mesos/trunk/src/tests/gc_tests.cpp
incubator/mesos/trunk/src/tests/isolator_tests.cpp
incubator/mesos/trunk/src/tests/log_tests.cpp
incubator/mesos/trunk/src/tests/utils.hpp
Modified: incubator/mesos/trunk/src/tests/gc_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/gc_tests.cpp?rev=1471671&r1=1471670&r2=1471671&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/gc_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/gc_tests.cpp Wed Apr 24 20:58:11 2013
@@ -441,7 +441,7 @@ TEST_F(GarbageCollectorIntegrationTest,
ASSERT_FALSE(os::exists(frameworkDir));
process::UPID filesUpid("files", process::ip(), process::port());
- EXPECT_RESPONSE_STATUS_WILL_EQ(
+ AWAIT_EXPECT_RESPONSE_STATUS_EQ(
process::http::NotFound().status,
process::http::get(filesUpid, "browse.json", "path=" + frameworkDir));
Modified: incubator/mesos/trunk/src/tests/isolator_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/isolator_tests.cpp?rev=1471671&r1=1471670&r2=1471671&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/isolator_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/isolator_tests.cpp Wed Apr 24 20:58:11 2013
@@ -119,8 +119,8 @@ TYPED_TEST(IsolatorTest, Usage)
driver.start();
- AWAIT_UNTIL(frameworkId);
- AWAIT_UNTIL(offers);
+ AWAIT_READY(frameworkId);
+ AWAIT_READY(offers);
EXPECT_NE(0u, offers.get().size());
@@ -150,7 +150,7 @@ TYPED_TEST(IsolatorTest, Usage)
driver.launchTasks(offers.get()[0].id(), tasks);
- AWAIT_UNTIL(status1);
+ AWAIT_READY(status1);
EXPECT_EQ(TASK_RUNNING, status1.get().state());
@@ -170,7 +170,7 @@ TYPED_TEST(IsolatorTest, Usage)
const Future<ResourceStatistics>& usage =
isolator.usage(frameworkId.get(), executorId);
- ASSERT_FUTURE_WILL_SUCCEED(usage);
+ AWAIT_READY(usage);
statistics = usage.get();
@@ -192,7 +192,7 @@ TYPED_TEST(IsolatorTest, Usage)
driver.killTask(task.task_id());
- AWAIT_FOR(status2, Seconds(5));
+ AWAIT_READY_FOR(status2, Seconds(5));
// TODO(bmahler): The command executor is buggy in that it does not
// send TASK_KILLED for a non-zero exit code due to a kill.
Modified: incubator/mesos/trunk/src/tests/log_tests.cpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/log_tests.cpp?rev=1471671&r1=1471670&r2=1471671&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/log_tests.cpp (original)
+++ incubator/mesos/trunk/src/tests/log_tests.cpp Wed Apr 24 20:58:11 2013
@@ -412,7 +412,7 @@ TEST(CoordinatorTest, ElectNoQuorum)
// Create a timeout here so that we can advance time.
Timeout timeout(Seconds(5));
- Clock::advance(5.0);
+ Clock::advance(Seconds(5));
{
Result<uint64_t> result = coord.elect(timeout);
@@ -456,7 +456,7 @@ TEST(CoordinatorTest, AppendNoQuorum)
// Create a timeout here so that we can advance time.
Timeout timeout(Seconds(5));
- Clock::advance(5.0);
+ Clock::advance(Seconds(5));
{
Result<uint64_t> result = coord.append("hello world", timeout);
Modified: incubator/mesos/trunk/src/tests/utils.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/utils.hpp?rev=1471671&r1=1471670&r2=1471671&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/utils.hpp (original)
+++ incubator/mesos/trunk/src/tests/utils.hpp Wed Apr 24 20:58:11 2013
@@ -248,7 +248,7 @@ protected:
Try<bool> exists = cgroups::exists(hierarchy, TEST_CGROUPS_ROOT);
ASSERT_SOME(exists);
if (exists.get()) {
- ASSERT_FUTURE_WILL_SUCCEED(cgroups::destroy(hierarchy, TEST_CGROUPS_ROOT));
+ AWAIT_READY(cgroups::destroy(hierarchy, TEST_CGROUPS_ROOT));
}
}