mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam B" <a...@mesosphere.io>
Subject Re: Review Request 41225: Added test cases for implicit roles.
Date Fri, 18 Dec 2015 22:44:18 GMT


> On Dec. 17, 2015, 11:37 p.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.

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.


> On Dec. 17, 2015, 11:37 p.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).

> "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.


- Adam


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41225/#review111127
-----------------------------------------------------------


On Dec. 18, 2015, 12: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, 12: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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message