Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-16 Thread Brian Wickman

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

(Updated Jan. 16, 2015, 7:10 p.m.)


Review request for Aurora, Joshua Cohen and Kevin Sweeney.


Changes
---

Assert on call_count.


Repository: aurora


Description
---

De-flakify ResourceManager integration test.


Diffs (updated)
-

  src/main/python/apache/aurora/executor/common/resource_manager.py 
bf69e7e60ae4dd857243d8b040a70daca008ea28 
  src/main/python/apache/thermos/monitoring/resource.py 
7b5bbe01810008c4d39b9dfee6521af01021a7ca 
  src/test/python/apache/aurora/executor/common/BUILD 
395ced27998def18eace2cbd46c736404c3d6411 
  
src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
 e3c766f9b7bf989c0790281231957947d2cda52a 

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


Testing
---

./pants goal test --no-test-pytest-fast 
src/test/python/apache/aurora/executor/common::


Thanks,

Brian Wickman



Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-16 Thread Aurora ReviewBot

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


This patch does not apply cleanly on master (1346c4f), do you need to rebase?

I will refresh this build result if you post a review containing @ReviewBot 
retry

- Aurora ReviewBot


On Jan. 16, 2015, 7:10 p.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/29901/
 ---
 
 (Updated Jan. 16, 2015, 7:10 p.m.)
 
 
 Review request for Aurora, Joshua Cohen and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 De-flakify ResourceManager integration test.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/common/resource_manager.py 
 bf69e7e60ae4dd857243d8b040a70daca008ea28 
   src/main/python/apache/thermos/monitoring/resource.py 
 7b5bbe01810008c4d39b9dfee6521af01021a7ca 
   src/test/python/apache/aurora/executor/common/BUILD 
 395ced27998def18eace2cbd46c736404c3d6411 
   
 src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
  e3c766f9b7bf989c0790281231957947d2cda52a 
 
 Diff: https://reviews.apache.org/r/29901/diff/
 
 
 Testing
 ---
 
 ./pants goal test --no-test-pytest-fast 
 src/test/python/apache/aurora/executor/common::
 
 
 Thanks,
 
 Brian Wickman
 




Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Brian Wickman

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

(Updated Jan. 15, 2015, 11:36 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
---

Make flaky test less bad (it's still bad -- but this code is destined for the 
trash can once we have feature parity from mesos.)


Repository: aurora


Description
---

De-flakify ResourceManager integration test.


Diffs (updated)
-

  src/main/python/apache/aurora/executor/common/resource_manager.py 
bf69e7e60ae4dd857243d8b040a70daca008ea28 
  src/main/python/apache/thermos/monitoring/resource.py 
7b5bbe01810008c4d39b9dfee6521af01021a7ca 
  src/test/python/apache/aurora/executor/common/BUILD 
395ced27998def18eace2cbd46c736404c3d6411 
  
src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
 e3c766f9b7bf989c0790281231957947d2cda52a 

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


Testing
---

./pants goal test --no-test-pytest-fast 
src/test/python/apache/aurora/executor/common::


Thanks,

Brian Wickman



Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Brian Wickman

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

(Updated Jan. 16, 2015, 12:11 a.m.)


Review request for Aurora and Kevin Sweeney.


Changes
---

Switch to using autospec, also allowing us to remove the factory stuff.


Repository: aurora


Description
---

De-flakify ResourceManager integration test.


Diffs (updated)
-

  src/main/python/apache/aurora/executor/common/resource_manager.py 
bf69e7e60ae4dd857243d8b040a70daca008ea28 
  src/main/python/apache/thermos/monitoring/resource.py 
7b5bbe01810008c4d39b9dfee6521af01021a7ca 
  src/test/python/apache/aurora/executor/common/BUILD 
395ced27998def18eace2cbd46c736404c3d6411 
  
src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
 e3c766f9b7bf989c0790281231957947d2cda52a 

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


Testing
---

./pants goal test --no-test-pytest-fast 
src/test/python/apache/aurora/executor/common::


Thanks,

Brian Wickman



Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Kevin Sweeney

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


Mind adding another committer with more recent mock experience to this review? 
I suggest jcohen.


src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
https://reviews.apache.org/r/29901/#comment112554

unused import



src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
https://reviews.apache.org/r/29901/#comment112555

unused import



src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
https://reviews.apache.org/r/29901/#comment112559

spec_set=True. This lets the spec define the interface and prevents you 
from setting mock properties that don't exist on the spec like

```py
mock_disk_collector.valu = 1234
```



src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
https://reviews.apache.org/r/29901/#comment112557

is the use of PropertyMock required here or can you do

```py
mock_disk_collector.value = 4197
```

same below



src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
https://reviews.apache.org/r/29901/#comment112556

Can you assert that the mocks are actually used below here (e.g. by 
checking expected calls were made)? A common issue with the client tests is the 
configuration of mocks that were later found to be unused.


- Kevin Sweeney


On Jan. 15, 2015, 4:11 p.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/29901/
 ---
 
 (Updated Jan. 15, 2015, 4:11 p.m.)
 
 
 Review request for Aurora and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 De-flakify ResourceManager integration test.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/common/resource_manager.py 
 bf69e7e60ae4dd857243d8b040a70daca008ea28 
   src/main/python/apache/thermos/monitoring/resource.py 
 7b5bbe01810008c4d39b9dfee6521af01021a7ca 
   src/test/python/apache/aurora/executor/common/BUILD 
 395ced27998def18eace2cbd46c736404c3d6411 
   
 src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
  e3c766f9b7bf989c0790281231957947d2cda52a 
 
 Diff: https://reviews.apache.org/r/29901/diff/
 
 
 Testing
 ---
 
 ./pants goal test --no-test-pytest-fast 
 src/test/python/apache/aurora/executor/common::
 
 
 Thanks,
 
 Brian Wickman
 




Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Aurora ReviewBot

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


Master (b75ed0f) is red with this patch.
  ./build-support/jenkins/build.sh

  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/python_builder.py,
 line 43, in build
debug=debug).run()
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/test_builder.py,
 line 88, in run
rv = self._run_tests([target], stdout, stderr)
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/test_builder.py,
 line 316, in _run_tests
with self._test_runner(targets, stdout, stderr) as (pex, test_args):
  File /usr/lib/python2.7/contextlib.py, line 17, in __enter__
return self.gen.next()
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/test_builder.py,
 line 295, in _test_runner
builder = chroot.dump()
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/python_chroot.py,
 line 191, in dump
conn_timeout=self._conn_timeout)
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pants/backend/python/resolver.py,
 line 100, in resolve_multi
platform=platform)
  File 
/home/jenkins/jenkins-slave/workspace/AuroraBot/build-support/pants.venv/lib/python2.7/site-packages/pex/resolver.py,
 line 101, in resolve
raise Unsatisfiable('Cannot satisfy requirements: %s' % 
requirement_set[requirement.key])
Unsatisfiable: Cannot satisfy requirements: 
[Requirement.parse('coverage=3.7.1,4.0a1')]


Usage: 
  pants build (options) [spec] (build args)
  pants build (options) [spec]... -- (build args)

Options:
  --version show program's version number and exit
  --no-pantsrc  Specifies that pantsrc files should be ignored.
  --log-exitLog an exit message on success or failure.
  -t CONN_TIMEOUT, --timeout=CONN_TIMEOUT
Number of seconds to wait for http connections.
  -i INTERPRETERS, --interpreter=INTERPRETERS
Constrain what Python interpreters to use.  Uses
Requirement format from pkg_resources, e.g.
'CPython=2.6,3' or 'PyPy'. By default, no
constraints are used.  Multiple constraints may be
added.  They will be ORed together.
  -v, --verbose Show verbose output.
  -f, --fastRun tests in a single chroot.

Builds the specified Python target(s). Use ./pants goal for JVM and other
targets.


I will refresh this build result if you post a review containing @ReviewBot 
retry

- Aurora ReviewBot


On Jan. 15, 2015, 11:36 p.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/29901/
 ---
 
 (Updated Jan. 15, 2015, 11:36 p.m.)
 
 
 Review request for Aurora and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 De-flakify ResourceManager integration test.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/common/resource_manager.py 
 bf69e7e60ae4dd857243d8b040a70daca008ea28 
   src/main/python/apache/thermos/monitoring/resource.py 
 7b5bbe01810008c4d39b9dfee6521af01021a7ca 
   src/test/python/apache/aurora/executor/common/BUILD 
 395ced27998def18eace2cbd46c736404c3d6411 
   
 src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
  e3c766f9b7bf989c0790281231957947d2cda52a 
 
 Diff: https://reviews.apache.org/r/29901/diff/
 
 
 Testing
 ---
 
 ./pants goal test --no-test-pytest-fast 
 src/test/python/apache/aurora/executor/common::
 
 
 Thanks,
 
 Brian Wickman
 




Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Brian Wickman

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

(Updated Jan. 16, 2015, 12:51 a.m.)


Review request for Aurora, Joshua Cohen and Kevin Sweeney.


Changes
---

Address Kevin's feedback.


Repository: aurora


Description
---

De-flakify ResourceManager integration test.


Diffs (updated)
-

  src/main/python/apache/aurora/executor/common/resource_manager.py 
bf69e7e60ae4dd857243d8b040a70daca008ea28 
  src/main/python/apache/thermos/monitoring/resource.py 
7b5bbe01810008c4d39b9dfee6521af01021a7ca 
  src/test/python/apache/aurora/executor/common/BUILD 
395ced27998def18eace2cbd46c736404c3d6411 
  
src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
 e3c766f9b7bf989c0790281231957947d2cda52a 

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


Testing
---

./pants goal test --no-test-pytest-fast 
src/test/python/apache/aurora/executor/common::


Thanks,

Brian Wickman



Re: Review Request 29901: De-flakify resource_manager_integration test

2015-01-15 Thread Aurora ReviewBot

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

Ship it!


Master (b75ed0f) is green with this patch.
  ./build-support/jenkins/build.sh

I will refresh this build result if you post a review containing @ReviewBot 
retry

- Aurora ReviewBot


On Jan. 16, 2015, 12:51 a.m., Brian Wickman wrote:
 
 ---
 This is an automatically generated e-mail. To reply, visit:
 https://reviews.apache.org/r/29901/
 ---
 
 (Updated Jan. 16, 2015, 12:51 a.m.)
 
 
 Review request for Aurora, Joshua Cohen and Kevin Sweeney.
 
 
 Repository: aurora
 
 
 Description
 ---
 
 De-flakify ResourceManager integration test.
 
 
 Diffs
 -
 
   src/main/python/apache/aurora/executor/common/resource_manager.py 
 bf69e7e60ae4dd857243d8b040a70daca008ea28 
   src/main/python/apache/thermos/monitoring/resource.py 
 7b5bbe01810008c4d39b9dfee6521af01021a7ca 
   src/test/python/apache/aurora/executor/common/BUILD 
 395ced27998def18eace2cbd46c736404c3d6411 
   
 src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
  e3c766f9b7bf989c0790281231957947d2cda52a 
 
 Diff: https://reviews.apache.org/r/29901/diff/
 
 
 Testing
 ---
 
 ./pants goal test --no-test-pytest-fast 
 src/test/python/apache/aurora/executor/common::
 
 
 Thanks,
 
 Brian Wickman
 




Review Request 29901: De-flakify resource_manager_integration test

2015-01-14 Thread Brian Wickman

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

Review request for Aurora and Kevin Sweeney.


Repository: aurora


Description
---

De-flakify ResourceManager integration test.


Diffs
-

  src/main/python/apache/aurora/executor/common/resource_manager.py 
bf69e7e60ae4dd857243d8b040a70daca008ea28 
  
src/test/python/apache/aurora/executor/common/test_resource_manager_integration.py
 e3c766f9b7bf989c0790281231957947d2cda52a 

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


Testing
---

./pants goal test --no-test-pytest-fast 
src/test/python/apache/aurora/executor/common::


Thanks,

Brian Wickman