mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kevin Klues <klue...@gmail.com>
Subject Re: Review Request 69426: Replaced CLI test helper function 'running_tasks' by 'wait_for_task'.
Date Mon, 26 Nov 2018 13:40:28 GMT

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




src/python/cli_new/lib/cli/tests/base.py
Lines 516 (patched)
<https://reviews.apache.org/r/69426/#comment295658>

    Let's return the task here. I'm not 100% sure when / how we will use it, but it's better
than just retunring `None` in my opinion.



src/python/cli_new/lib/cli/tests/task.py
Lines 70 (patched)
<https://reviews.apache.org/r/69426/#comment295659>

    Add the name of the task in the error message.



src/python/cli_new/lib/cli/tests/task.py
Lines 77 (patched)
<https://reviews.apache.org/r/69426/#comment295661>

    This could fail for two reasons (which is fine), but we should change the error message
to reflect exactly what's gone wrong (i.e. that we can't get the tasks from that endpoint
-- not just that we couldn't open it).



src/python/cli_new/lib/cli/tests/task.py
Lines 78 (patched)
<https://reviews.apache.org/r/69426/#comment295660>

    Let's put a line break here.



src/python/cli_new/lib/cli/tests/task.py
Lines 96-99 (original), 108-122 (patched)
<https://reviews.apache.org/r/69426/#comment295662>

    Same comments as above.



src/python/cli_new/lib/cli/tests/task.py
Lines 129-132 (original), 152-166 (patched)
<https://reviews.apache.org/r/69426/#comment295663>

    Same comments as above.



src/python/cli_new/lib/cli/tests/task.py
Lines 164-168 (original), 198-210 (patched)
<https://reviews.apache.org/r/69426/#comment295664>

    Same comments as above.


- Kevin Klues


On Nov. 25, 2018, 11:08 vorm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69426/
> -----------------------------------------------------------
> 
> (Updated Nov. 25, 2018, 11:08 vorm.)
> 
> 
> Review request for mesos and Kevin Klues.
> 
> 
> Bugs: MESOS-9399
>     https://issues.apache.org/jira/browse/MESOS-9399
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Replaces 'running_tasks(master)', a function that was not generic nor
> explicit, by 'wait_for_task(master, name, state, delay)'. This helper
> function waits a 'delay' for a task with a given 'name' to be in a
> certain 'state'.
> 
> All uses of 'running_tasks' have been replaced by the new function.
> 
> 
> Diffs
> -----
> 
>   src/python/cli_new/lib/cli/tests/base.py c28e2a65b5c1b881c2f4eb09baf9806338f26e40 
>   src/python/cli_new/lib/cli/tests/task.py 1b48c0a4729043c874330552074b05368e38b715 
> 
> 
> Diff: https://reviews.apache.org/r/69426/diff/2/
> 
> 
> Testing
> -------
> 
> ```
> (mesos-cli) ?  cli_new (MESOS-9399) ? mesos-cli-tests
> Running the Mesos CLI unit tests
> 
> TestAgentPlugin
> test_list (cli.tests.agent.TestAgentPlugin) ... ok
> 
> TestInfrastructure
> test_capture_output (cli.tests.tests.TestInfrastructure) ... ok
> test_launch_binaries (cli.tests.tests.TestInfrastructure) ... ok
> 
> TestTaskPlugin
> test_exec (cli.tests.task.TestTaskPlugin) ... ok
> test_exec_exit_status (cli.tests.task.TestTaskPlugin) ... ok
> test_exec_interactive (cli.tests.task.TestTaskPlugin) ... ok
> test_list (cli.tests.task.TestTaskPlugin) ... ok
> 
> ----------------------------------------------------------------------
> Ran 7 tests in 19.319s
> 
> OK
> ```
> 
> 
> Thanks,
> 
> Armand Grillet
> 
>


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