Repository: mesos Updated Branches: refs/heads/master 3ded707ca -> 643dafdec
Fixed alicloud unit test for limited timeout. Alicloud server is in Asia. We parameterized the unit test `ROOT_INTERNET_CURL_SimpleCommand` to test different registry with unifed containerizer. Longer `executor_registration_timeout` should be given to make sure the image download is not impacted by network legacy. Review: https://reviews.apache.org/r/58465/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/265754fa Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/265754fa Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/265754fa Branch: refs/heads/master Commit: 265754fae99baeffbafaf2383d396754ba6ca3ff Parents: 3ded707 Author: Gilbert Song <[email protected]> Authored: Tue Apr 18 07:57:23 2017 +0800 Committer: Jie Yu <[email protected]> Committed: Tue Apr 18 07:57:23 2017 +0800 ---------------------------------------------------------------------- src/tests/containerizer/provisioner_docker_tests.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/265754fa/src/tests/containerizer/provisioner_docker_tests.cpp ---------------------------------------------------------------------- diff --git a/src/tests/containerizer/provisioner_docker_tests.cpp b/src/tests/containerizer/provisioner_docker_tests.cpp index b0a4d21..d1224d8 100644 --- a/src/tests/containerizer/provisioner_docker_tests.cpp +++ b/src/tests/containerizer/provisioner_docker_tests.cpp @@ -16,6 +16,7 @@ #include <gmock/gmock.h> +#include <stout/duration.hpp> #include <stout/gtest.hpp> #include <stout/json.hpp> #include <stout/os.hpp> @@ -474,6 +475,10 @@ TEST_P(ProvisionerDockerPullerTest, ROOT_INTERNET_CURL_SimpleCommand) flags.isolation = "docker/runtime,filesystem/linux"; flags.image_providers = "docker"; + // Image pulling time may be long, depending on the location of + // the registry server. + flags.executor_registration_timeout = Minutes(3); + Owned<MasterDetector> detector = master.get()->createDetector(); Try<Owned<cluster::Slave>> slave = StartSlave(detector.get(), flags); ASSERT_SOME(slave); @@ -527,7 +532,7 @@ TEST_P(ProvisionerDockerPullerTest, ROOT_INTERNET_CURL_SimpleCommand) driver.launchTasks(offer.id(), {task}); - AWAIT_READY_FOR(statusRunning, Seconds(60)); + AWAIT_READY_FOR(statusRunning, Minutes(3)); EXPECT_EQ(task.task_id(), statusRunning->task_id()); EXPECT_EQ(TASK_RUNNING, statusRunning->state());
