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 Thu, 22 Nov 2018 16:39:58 GMT

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




src/python/cli_new/lib/cli/tests/base.py
Line 506 (original), 507 (patched)
<https://reviews.apache.org/r/69426/#comment295570>

    Add a default dealy of 1 here, so that tests don't always have to write it in.



src/python/cli_new/lib/cli/tests/base.py
Line 521 (original), 522 (patched)
<https://reviews.apache.org/r/69426/#comment295571>

    This should be a CLIException and should have a string saying:
    ```
    "Timed out waiting for task"
    ```



src/python/cli_new/lib/cli/tests/task.py
Lines 65-68 (original), 66-70 (patched)
<https://reviews.apache.org/r/69426/#comment295572>

    The new `wait_or_task` call should be wrapped in a `try` and the `CLIException` it raises
should be composed according to the normal composition rules we use for exceptions.
    
    We also don't need the delay set explicitly to `1` anymore if you make the change mentioned
in the previous file.
    
    Apply this to all instance of this pattern below as well.


- Kevin Klues


On Nov. 22, 2018, 11:35 vorm., Armand Grillet wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/69426/
> -----------------------------------------------------------
> 
> (Updated Nov. 22, 2018, 11:35 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 f033b4a7663279c8a7c49ed86b3acdda45ceb107 
> 
> 
> Diff: https://reviews.apache.org/r/69426/diff/1/
> 
> 
> 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