Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-08 Thread Bill Farner


 On Oct. 7, 2014, 9:39 p.m., Mark Chu-Carroll wrote:
  Looks good.
  
  One note on the change description: I'm willing to bet that there is a way 
  to get that branch active in a test. Every single time that I've ever said 
  that something couldn't be tested, or that some branch couldn't be 
  exercised in a test, I've always been wrong. There's a way.

Poor wording on my part.  I meant to say that it was not possible to enter 
those branches before this diff, meaning we would continue to loop when an 
exception was caught.  With this diff, those branches are now entered in 
pracice and in the test cases changed.


- Bill


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


On Oct. 4, 2014, 5:55 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 5:55 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-08 Thread Bill Farner


 On Oct. 7, 2014, 9:18 p.m., Kevin Sweeney wrote:
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py, line 51
  https://reviews.apache.org/r/26308/diff/5/?file=713862#file713862line51
 
  Why do these need to be mocks? This would work identically using the 
  Thrift structures directly.
  
  If you want to prevent setting a field that doesn't exist you can use 
  the constructor kwargs form of the thrift object, i.e.
  
  ```py
  task = ScheduledTask(
key=JobKey(role=..., ...),
assignedTask=AssignedTask(
  slaveHost=...,
  ...
),
...
  )
  ```

I thought the same way when i came to this code, but had already pulled a long 
thread with this diff and didn't want to continue further for the sake of 
reviewer sanity.


- Bill


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


On Oct. 4, 2014, 5:55 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 5:55 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: 

Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-08 Thread Kevin Sweeney

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

Ship it!


Ship It!

- Kevin Sweeney


On Oct. 4, 2014, 10:55 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 10:55 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-08 Thread Joe Smith

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

Ship it!


Ship It!

- Joe Smith


On Oct. 4, 2014, 10:55 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 10:55 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-08 Thread Bill Farner

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

(Updated Oct. 8, 2014, 8:57 p.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
---

Another rebase cycle, more merge conflicts while waiting for tests to run.


Repository: aurora


Description
---

Fixes two problems:

- mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
objects were being passed around and somehow resulted in the test case passing.
- use of `threading.Event()` was broken in scheduler_client.py.  I don't think 
it's possible to enter those branches.


Diffs (updated)
-

  src/main/python/apache/aurora/client/api/__init__.py 
26300792594e4005dacc139a9f89711b8a66ab61 
  src/main/python/apache/aurora/client/api/command_runner.py 
a1fed5fc75dde3a79c840515e6daa4741156ef97 
  src/main/python/apache/aurora/client/api/job_monitor.py 
18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
  src/main/python/apache/aurora/client/api/scheduler_client.py 
311c954f1db245b75192d00c6aca0721085fbf32 
  src/main/python/apache/aurora/client/api/updater.py 
bb4a7555851341e450da408441975f078f2b5576 
  src/main/python/apache/aurora/common/aurora_job_key.py 
a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
  src/test/python/apache/aurora/client/api/test_job_monitor.py 
5b26539f86a0a82f72753a803a769eda77cbc332 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
1835843f1795b0530874ec561582df17acfbce65 
  src/test/python/apache/aurora/client/api/test_updater.py 
fe27391a7b267e5acf4dc5f1a82a8199777d5b04 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
733327b557df3e81c6d723bf24e753442fa375ca 
  src/test/python/apache/aurora/client/cli/test_cancel_update.py 
c15e142930c9474c7873dd931261b6ab4eb5967f 
  src/test/python/apache/aurora/client/cli/test_command_hooks.py 
3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
  src/test/python/apache/aurora/client/cli/test_create.py 
d17203578438fcae1f12b5e70e78e420b87554e4 
  src/test/python/apache/aurora/client/cli/test_diff.py 
e1a6f764830e06c73d0bc10a3b5da67219da836c 
  src/test/python/apache/aurora/client/cli/test_kill.py 
e3a366bf67074e50787394cad58d5e01359b641e 
  src/test/python/apache/aurora/client/cli/test_logging.py 
6285fbb07442291c2dc4096e68eb285c98994097 
  src/test/python/apache/aurora/client/cli/test_plugins.py 
7c79c7a75e77e47544684c0f767d248d2540901a 
  src/test/python/apache/aurora/client/cli/test_status.py 
d26371249aa4f5b671c9ace9b503e756cb39528a 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
1ce9a632874e818eee71573cd481842affae3615 
  src/test/python/apache/aurora/client/cli/test_update.py 
85b1db19d89967a741bfba7964eeb368426f0b61 
  src/test/python/apache/aurora/client/commands/test_admin.py 
1192556c027dc3adf16bb37adeac7798cf9ef93d 
  src/test/python/apache/aurora/client/commands/test_cancel_update.py 
5f05ef7c0643d189de3de38c75aae58c2a3814a4 
  src/test/python/apache/aurora/client/commands/test_create.py 
7503345ea1c0f224a894ce02cc2c2d8719574e32 
  src/test/python/apache/aurora/client/commands/test_diff.py 
8f5da7d2bca9b0486b635afe49d3885151624e12 
  src/test/python/apache/aurora/client/commands/test_hooks.py 
0861f13b13a8406950ba953efba0ffae186a8253 
  src/test/python/apache/aurora/client/commands/test_kill.py 
c0a6fd44c5691cde50746ffdec325bb11a33469a 
  src/test/python/apache/aurora/client/commands/test_run.py 
e97b5156609f80a4170028e780bcd891e56983ff 
  src/test/python/apache/aurora/client/commands/test_ssh.py 
33262248d14a2cc182d87fde736090f38c322bf4 
  src/test/python/apache/aurora/client/commands/test_status.py 
bda1f28d544ae48428129f8167d8632ef27f5fba 
  src/test/python/apache/aurora/client/commands/test_update.py 
af2cbc7f88287201a472ba36902b00d90bc77d3b 

Diff: https://reviews.apache.org/r/26308/diff/


Testing
---

./pants src/test/python:all -vxs


Thanks,

Bill Farner



Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-07 Thread Kevin Sweeney

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



src/test/python/apache/aurora/client/cli/test_api_from_cli.py
https://reviews.apache.org/r/26308/#comment96092

Why do these need to be mocks? This would work identically using the Thrift 
structures directly.

If you want to prevent setting a field that doesn't exist you can use the 
constructor kwargs form of the thrift object, i.e.

```py
task = ScheduledTask(
  key=JobKey(role=..., ...),
  assignedTask=AssignedTask(
slaveHost=...,
...
  ),
  ...
)
```


- Kevin Sweeney


On Oct. 4, 2014, 10:55 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 10:55 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-07 Thread Mark Chu-Carroll

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

Ship it!


Ship It!

- Mark Chu-Carroll


On Oct. 4, 2014, 1:55 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 1:55 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-07 Thread Mark Chu-Carroll

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


Looks good.

One note on the change description: I'm willing to bet that there is a way to 
get that branch active in a test. Every single time that I've ever said that 
something couldn't be tested, or that some branch couldn't be exercised in a 
test, I've always been wrong. There's a way.

- Mark Chu-Carroll


On Oct. 4, 2014, 1:55 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 1:55 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-06 Thread Bill Farner

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


Kevin, Mark - ping?

- Bill Farner


On Oct. 4, 2014, 5:55 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 4, 2014, 5:55 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/__init__.py 
 26300792594e4005dacc139a9f89711b8a66ab61 
   src/main/python/apache/aurora/client/api/command_runner.py 
 a1fed5fc75dde3a79c840515e6daa4741156ef97 
   src/main/python/apache/aurora/client/api/job_monitor.py 
 18d5c0381d43fc7b24bae4b2e5e6fdc774a74b52 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 311c954f1db245b75192d00c6aca0721085fbf32 
   src/main/python/apache/aurora/client/api/updater.py 
 bf608981c2f2e7960b68c3fbda144277a59a3d40 
   src/main/python/apache/aurora/common/aurora_job_key.py 
 a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
   src/test/python/apache/aurora/client/api/test_job_monitor.py 
 5b26539f86a0a82f72753a803a769eda77cbc332 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1835843f1795b0530874ec561582df17acfbce65 
   src/test/python/apache/aurora/client/api/test_updater.py 
 6905831b23a84320e7f41843efd62b86da366c0b 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
   src/test/python/apache/aurora/client/cli/test_cancel_update.py 
 c15e142930c9474c7873dd931261b6ab4eb5967f 
   src/test/python/apache/aurora/client/cli/test_command_hooks.py 
 3acd2ba0d8bd8c71d4c0a9d71a035fc974fa20c3 
   src/test/python/apache/aurora/client/cli/test_create.py 
 6e55188bdfc576506848605debb391288e696fe3 
   src/test/python/apache/aurora/client/cli/test_diff.py 
 e1a6f764830e06c73d0bc10a3b5da67219da836c 
   src/test/python/apache/aurora/client/cli/test_kill.py 
 e3a366bf67074e50787394cad58d5e01359b641e 
   src/test/python/apache/aurora/client/cli/test_logging.py 
 6285fbb07442291c2dc4096e68eb285c98994097 
   src/test/python/apache/aurora/client/cli/test_plugins.py 
 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a 
   src/test/python/apache/aurora/client/cli/test_status.py 
 bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
   src/test/python/apache/aurora/client/cli/test_task_run.py 
 1ce9a632874e818eee71573cd481842affae3615 
   src/test/python/apache/aurora/client/cli/test_update.py 
 85b1db19d89967a741bfba7964eeb368426f0b61 
   src/test/python/apache/aurora/client/commands/test_admin.py 
 1192556c027dc3adf16bb37adeac7798cf9ef93d 
   src/test/python/apache/aurora/client/commands/test_cancel_update.py 
 5f05ef7c0643d189de3de38c75aae58c2a3814a4 
   src/test/python/apache/aurora/client/commands/test_create.py 
 7503345ea1c0f224a894ce02cc2c2d8719574e32 
   src/test/python/apache/aurora/client/commands/test_diff.py 
 8f5da7d2bca9b0486b635afe49d3885151624e12 
   src/test/python/apache/aurora/client/commands/test_hooks.py 
 0861f13b13a8406950ba953efba0ffae186a8253 
   src/test/python/apache/aurora/client/commands/test_kill.py 
 c0a6fd44c5691cde50746ffdec325bb11a33469a 
   src/test/python/apache/aurora/client/commands/test_run.py 
 e97b5156609f80a4170028e780bcd891e56983ff 
   src/test/python/apache/aurora/client/commands/test_ssh.py 
 c5ca66e378bfc97c40a406a758ae4dfaef8ab2c8 
   src/test/python/apache/aurora/client/commands/test_status.py 
 bda1f28d544ae48428129f8167d8632ef27f5fba 
   src/test/python/apache/aurora/client/commands/test_update.py 
 af2cbc7f88287201a472ba36902b00d90bc77d3b 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-03 Thread Maxim Khutornenko

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

Ship it!


Great catch! The is_set got lost there via multiple conflict resolutions while 
the parallel updater was under construction.

- Maxim Khutornenko


On Oct. 3, 2014, 4:52 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 3, 2014, 4:52 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 b400cb2dbdb35077fc2c4a6e161c2959a9217317 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1cbfbf86e903d890baac7d34461109f9beaff442 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-03 Thread Bill Farner

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


Kevin, Mark - ping?

- Bill Farner


On Oct. 3, 2014, 4:52 a.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 3, 2014, 4:52 a.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 b400cb2dbdb35077fc2c4a6e161c2959a9217317 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1cbfbf86e903d890baac7d34461109f9beaff442 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-03 Thread Joe Smith

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



src/test/python/apache/aurora/client/cli/test_api_from_cli.py
https://reviews.apache.org/r/26308/#comment95761

Can you also assert that this was called?



src/test/python/apache/aurora/client/cli/test_api_from_cli.py
https://reviews.apache.org/r/26308/#comment95762

can you instead .assert_called_once_with(args) ?


- Joe Smith


On Oct. 2, 2014, 9:52 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 2, 2014, 9:52 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 b400cb2dbdb35077fc2c4a6e161c2959a9217317 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1cbfbf86e903d890baac7d34461109f9beaff442 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-03 Thread Bill Farner

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

(Updated Oct. 3, 2014, 11:25 p.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
---

I need to do some more work here - started pulling a thread on using 
`TaskQuery.jobKeys`.  Still need to correct some tests after that switch.


Repository: aurora


Description
---

Fixes two problems:

- mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
objects were being passed around and somehow resulted in the test case passing.
- use of `threading.Event()` was broken in scheduler_client.py.  I don't think 
it's possible to enter those branches.


Diffs (updated)
-

  src/main/python/apache/aurora/client/api/__init__.py 
e1dfee7571b19f93fe4edfc0b7a81a3d496a09ba 
  src/main/python/apache/aurora/client/api/command_runner.py 
a1fed5fc75dde3a79c840515e6daa4741156ef97 
  src/main/python/apache/aurora/client/api/job_monitor.py 
756093dff8cf101158f2be803cc31f43ceabe654 
  src/main/python/apache/aurora/client/api/scheduler_client.py 
b400cb2dbdb35077fc2c4a6e161c2959a9217317 
  src/main/python/apache/aurora/client/api/updater.py 
bf608981c2f2e7960b68c3fbda144277a59a3d40 
  src/main/python/apache/aurora/common/aurora_job_key.py 
a7ca7b6df6b9566b3ce617283ccac948deb2eb83 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
1cbfbf86e903d890baac7d34461109f9beaff442 
  src/test/python/apache/aurora/client/api/test_updater.py 
e4c9ad026323fc51ff8b9a2960abf9efdee6c898 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
78f21d2f20cf71fa2dfe0614885d44d2948decd2 
  src/test/python/apache/aurora/client/cli/test_create.py 
6e55188bdfc576506848605debb391288e696fe3 
  src/test/python/apache/aurora/client/cli/test_kill.py 
e3a366bf67074e50787394cad58d5e01359b641e 
  src/test/python/apache/aurora/client/cli/test_status.py 
bd30b11022ee0d1fb38da9f6efd4d9c5923b7d13 
  src/test/python/apache/aurora/client/cli/test_task_run.py 
1ce9a632874e818eee71573cd481842affae3615 
  src/test/python/apache/aurora/client/commands/test_kill.py 
3e6d048590b07603540b3dab026c8fde3c3c4ba4 

Diff: https://reviews.apache.org/r/26308/diff/


Testing
---

./pants src/test/python:all -vxs


Thanks,

Bill Farner



Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-02 Thread Bill Farner

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

(Updated Oct. 3, 2014, 2:38 a.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Changes
---

Missed one.


Repository: aurora


Description
---

Fixes two problems:

- mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
objects were being passed around and somehow resulted in the test case passing.
- use of `threading.Event()` was broken in scheduler_client.py.  I don't think 
it's possible to enter those branches.


Diffs (updated)
-

  src/main/python/apache/aurora/client/api/scheduler_client.py 
b400cb2dbdb35077fc2c4a6e161c2959a9217317 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
1cbfbf86e903d890baac7d34461109f9beaff442 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
78f21d2f20cf71fa2dfe0614885d44d2948decd2 

Diff: https://reviews.apache.org/r/26308/diff/


Testing
---

./pants src/test/python:all -vxs


Thanks,

Bill Farner



Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-02 Thread Joe Smith

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



src/test/python/apache/aurora/client/cli/test_api_from_cli.py
https://reviews.apache.org/r/26308/#comment95691

you need to set a spec here

Mock(SchedulerClient)


- Joe Smith


On Oct. 2, 2014, 7:38 p.m., Bill Farner wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/26308/
 ---
 
 (Updated Oct. 2, 2014, 7:38 p.m.)
 
 
 Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 Fixes two problems:
 
 - mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
 objects were being passed around and somehow resulted in the test case 
 passing.
 - use of `threading.Event()` was broken in scheduler_client.py.  I don't 
 think it's possible to enter those branches.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/client/api/scheduler_client.py 
 b400cb2dbdb35077fc2c4a6e161c2959a9217317 
   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
 1cbfbf86e903d890baac7d34461109f9beaff442 
   src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
 78f21d2f20cf71fa2dfe0614885d44d2948decd2 
 
 Diff: https://reviews.apache.org/r/26308/diff/
 
 
 Testing
 ---
 
 ./pants src/test/python:all -vxs
 
 
 Thanks,
 
 Bill Farner
 




Re: Review Request 26308: Fix exit condition for RPC loop, fix test_status_api_failure test.

2014-10-02 Thread Bill Farner

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

(Updated Oct. 3, 2014, 4:52 a.m.)


Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.


Repository: aurora


Description
---

Fixes two problems:

- mocking was incorrect in `test_status_api_failure`.  Turns out that Mock 
objects were being passed around and somehow resulted in the test case passing.
- use of `threading.Event()` was broken in scheduler_client.py.  I don't think 
it's possible to enter those branches.


Diffs (updated)
-

  src/main/python/apache/aurora/client/api/scheduler_client.py 
b400cb2dbdb35077fc2c4a6e161c2959a9217317 
  src/test/python/apache/aurora/client/api/test_scheduler_client.py 
1cbfbf86e903d890baac7d34461109f9beaff442 
  src/test/python/apache/aurora/client/cli/test_api_from_cli.py 
78f21d2f20cf71fa2dfe0614885d44d2948decd2 

Diff: https://reviews.apache.org/r/26308/diff/


Testing
---

./pants src/test/python:all -vxs


Thanks,

Bill Farner