> On Dec. 18, 2015, 7:37 a.m., Adam B wrote:
> > src/tests/role_tests.cpp, line 107
> > <https://reviews.apache.org/r/41225/diff/7/?file=1170532#file1170532line107>
> >
> > Is this necessary? The defaultAgentResourcesString is
> > "cpus:2;mem:1024;disk:1024;ports:[31000-32000]"
> > Overriding that means that Mesos will auto-detect cpus/mem
>
> Neil Conway wrote:
> Personally, I think it is better to be more explicit: when I read the
> test case code, I can see that resource specification for the slave, rather
> than relying on `defaultAgentResourcesString` which is defined someplace else.
>
> Adam B wrote:
> Ok then, if you want to be explicit, can you set `slaveFlags.resource =
> "cpus:2;mem:1024;disk:1024"` instead, so it's clear how much cpu+mem this
> slave will have. I fear the autodetection logic, especially on small
> nodes/VMs.
Okay, I'll set cpus and mem as well. Although I notice we don't do this in a
few other tests:
```
$ ag "slaveFlags.resources" src/tests | wc -l
42
$ ag "slaveFlags.resources" src/tests | grep -v cpus | grep -v mem | wc -l
17
```
> On Dec. 18, 2015, 7:37 a.m., Adam B wrote:
> > src/tests/role_tests.cpp, lines 251-259
> > <https://reviews.apache.org/r/41225/diff/7/?file=1170532#file1170532line251>
> >
> > Why bother to send back the ack? Or even send the status back at all?
> > As soon as you have a MockExecutor that receives a launchTask, you've
> > verified that "when using implicit roles, a static reservation can be used
> > to launch a task"
>
> Neil Conway wrote:
> After you do `driver.acceptOffers({offer.id()}, {LAUNCH({taskInfo})},
> filters);`, how do you verify that the master has received the launch task
> attempt before the test case shuts down? It seems to me you need some form of
> synchronization (and indeed, removing the code that waits for the status ack
> causes the test to fail).
>
> Adam B wrote:
> > "how do you verify that the master has received the launch task?"
> If you `Future<TaskInfo> launchTask; EXPECT_CALL(exec, launchTask(_,
> _)).WillOnce(FutureArg<1>(&launchTask));` then you can
> `AWAIT_READY(launchTask);` to know that the master received the launch task,
> passed it on to the slave, the slave launched the executor and told it to
> launchTask. That's all you need to know. You don't even have to
> `SendStatusUpdateFromTask(TASK_FINISHED)`, which means that the ack is
> unnecessary and won't cause a failure.
Sounds good!
- Neil
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41225/#review111127
-----------------------------------------------------------
On Dec. 18, 2015, 8:01 p.m., Neil Conway wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41225/
> -----------------------------------------------------------
>
> (Updated Dec. 18, 2015, 8:01 p.m.)
>
>
> Review request for mesos, Adam B, Alexander Rukletsov, and Yongqiao Wang.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Added test cases for implicit roles.
>
>
> Diffs
> -----
>
> src/tests/role_tests.cpp PRE-CREATION
>
> Diff: https://reviews.apache.org/r/41225/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Neil Conway
>
>