You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2018/05/24 20:33:25 UTC

[2/2] mesos git commit: Removed an unneeded test.

Removed an unneeded test.

This test is covered by many other tests, and is testing for a
deprecated feature. Thus remove this test.

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


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

Branch: refs/heads/master
Commit: 902868fac0785b160c6cf0f13e655451bc0aa7ce
Parents: 9780b21
Author: Jie Yu <yu...@gmail.com>
Authored: Thu May 24 10:03:52 2018 -0700
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu May 24 13:33:13 2018 -0700

----------------------------------------------------------------------
 src/tests/slave_tests.cpp | 86 ------------------------------------------
 1 file changed, 86 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/902868fa/src/tests/slave_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/slave_tests.cpp b/src/tests/slave_tests.cpp
index 65d8605..5d3abd2 100644
--- a/src/tests/slave_tests.cpp
+++ b/src/tests/slave_tests.cpp
@@ -931,92 +931,6 @@ TEST_F(SlaveTest, GetExecutorInfoForTaskWithContainer)
 }
 
 
-// This tests ensures that MesosContainerizer will launch a command
-// executor even if it contains a ContainerInfo in the TaskInfo.
-// Prior to 0.26.0, this was only used to launch Docker containers, so
-// MesosContainerizer would fail the launch.
-//
-// TODO(jieyu): Move this test to the mesos containerizer tests.
-TEST_F(SlaveTest, ROOT_LaunchTaskInfoWithContainerInfo)
-{
-  Try<Owned<cluster::Master>> master = StartMaster();
-  ASSERT_SOME(master);
-
-  // Need flags for 'executor_registration_timeout'.
-  slave::Flags flags = CreateSlaveFlags();
-  flags.isolation = defaultIsolators;
-
-  Fetcher fetcher(flags);
-
-  Try<MesosContainerizer*> _containerizer =
-    MesosContainerizer::create(flags, false, &fetcher);
-
-  ASSERT_SOME(_containerizer);
-  Owned<MesosContainerizer> containerizer(_containerizer.get());
-
-  StandaloneMasterDetector detector;
-
-  Try<Owned<cluster::Slave>> slave = StartSlave(
-      &detector,
-      containerizer.get(),
-      flags,
-      true);
-
-  ASSERT_SOME(slave);
-  ASSERT_NE(nullptr, slave.get()->mock());
-
-  FrameworkInfo frameworkInfo = DEFAULT_FRAMEWORK_INFO;
-  frameworkInfo.mutable_id()->set_value(
-      "20141010-221431-251662764-60288-12345-0000");
-
-  Resources taskResources = Resources::parse("cpus:0.1;mem:32").get();
-  taskResources.allocate(frameworkInfo.roles(0));
-
-  // Launch a task with the command executor and ContainerInfo with
-  // NetworkInfo.
-  TaskInfo task;
-  task.set_name("task");
-  task.mutable_task_id()->set_value("1");
-  task.mutable_slave_id()->set_value(
-      "20141010-221431-251662764-60288-12345-0001");
-  task.mutable_resources()->MergeFrom(taskResources);
-  task.mutable_command()->MergeFrom(echoAuthorCommand());
-
-  ContainerID containerId;
-  containerId.set_value(id::UUID::random().toString());
-
-  ContainerInfo* container = task.mutable_container();
-  container->set_type(ContainerInfo::MESOS);
-
-  NetworkInfo* network = container->add_network_infos();
-  network->add_ip_addresses()->set_ip_address("4.3.2.1");
-  network->add_groups("public");
-
-  const ExecutorInfo& executor =
-    slave.get()->mock()->getExecutorInfo(frameworkInfo, task);
-
-  Try<string> sandbox = environment->mkdtemp();
-  ASSERT_SOME(sandbox);
-
-  SlaveID slaveID;
-  slaveID.set_value(id::UUID::random().toString());
-  Future<Containerizer::LaunchResult> launch = containerizer->launch(
-      containerId,
-      createContainerConfig(task, executor, sandbox.get(), "nobody"),
-      map<string, string>(),
-      None());
-
-  // TODO(spikecurtis): With agent capabilities (MESOS-3362), the
-  // Containerizer should fail this request since none of the listed
-  // isolators can handle NetworkInfo, which implies
-  // IP-per-container.
-  AWAIT_EXPECT_EQ(Containerizer::LaunchResult::SUCCESS, launch);
-
-  // Wait for the container to terminate before shutting down.
-  AWAIT_READY(containerizer->wait(containerId));
-}
-
-
 // This test runs a command without the command user field set. The
 // command will verify the assumption that the command is run as the
 // slave user (in this case, root).