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/12 19:38:30 UTC
svn commit: r1467374 - /incubator/mesos/trunk/src/tests/cluster.hpp
Author: benh
Date: Fri Apr 12 17:38:30 2013
New Revision: 1467374
URL: http://svn.apache.org/r1467374
Log:
Added another Cluster::Slaves::start.
Review: https://reviews.apache.org/r/10308
Modified:
incubator/mesos/trunk/src/tests/cluster.hpp
Modified: incubator/mesos/trunk/src/tests/cluster.hpp
URL: http://svn.apache.org/viewvc/incubator/mesos/trunk/src/tests/cluster.hpp?rev=1467374&r1=1467373&r2=1467374&view=diff
==============================================================================
--- incubator/mesos/trunk/src/tests/cluster.hpp (original)
+++ incubator/mesos/trunk/src/tests/cluster.hpp Fri Apr 12 17:38:30 2013
@@ -72,7 +72,13 @@ public:
// Start and manage a new master.
Try<process::PID<master::Master> > start();
+
+ // Start and manage a new master using the specified flags.
Try<process::PID<master::Master> > start(const master::Flags& flags);
+
+ // Start and manage a new master injecting the specified allocator
+ // process. The allocator process is expected to outlive the
+ // launched master (i.e., until it is stopped via Masters::stop).
Try<process::PID<master::Master> > start(
master::AllocatorProcess* allocatorProcess);
@@ -124,10 +130,30 @@ public:
// Start and manage a new slave.
Try<process::PID<slave::Slave> > start();
+
+ // Start and manage a new slave using the specified flags.
Try<process::PID<slave::Slave> > start(const slave::Flags& flags);
+
+ // Start and manage a new slave with a testing isolator that uses
+ // the specified executor for the specified ID. The executor is
+ // expected to outlive the launched slave (i.e., until it is
+ // stopped via Slaves::stop).
Try<process::PID<slave::Slave> > start(
const ExecutorID& executorId,
Executor* executor);
+
+ // Start and manage a new slave using the specified flags with a
+ // testing isolator that uses the specified executor for the
+ // specified ID. The executor is expected to outlive the launched
+ // slave (i.e., until it is stopped via Slaves::stop).
+ Try<process::PID<slave::Slave> > start(
+ const slave::Flags& flags,
+ const ExecutorID& executorId,
+ Executor* executor);
+
+ // Start and manage a new slave injecting the specified isolator.
+ // The isolator is expected to outlive the launched slave (i.e.,
+ // until it is stopped via Slaves::stop).
Try<process::PID<slave::Slave> > start(slave::Isolator* isolator);
Try<process::PID<slave::Slave> > start(
const slave::Flags& flags,
@@ -404,6 +430,15 @@ inline Try<process::PID<slave::Slave> >
const ExecutorID& executorId,
Executor* executor)
{
+ return start(flags, executorId, executor);
+}
+
+
+inline Try<process::PID<slave::Slave> > Cluster::Slaves::start(
+ const slave::Flags& flags,
+ const ExecutorID& executorId,
+ Executor* executor)
+{
// TODO(benh): Check that we dont have another slave already running
// with flags that conflict (e.g., work_dir).