You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@aurora.apache.org by Joe Smith <ya...@gmail.com> on 2014/10/25 02:12:12 UTC

Review Request 27182: Add a test for the thermos resource module

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

Review request for Aurora and Kevin Sweeney.


Repository: aurora


Description
-------

Add a test for the thermos resource module


Diffs
-----

  src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
  src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
  src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 

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


Testing
-------

[tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
==================================================================================================================================================== test session starts =====================================================================================================================================================
platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
plugins: cov, timeout
collected 5 items 

src/test/python/apache/thermos/monitoring/test_resource.py .....

================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS


Thanks,

Joe Smith


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/#review71378
-----------------------------------------------------------

Ship it!


Master (5059040) 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 Feb. 6, 2015, 5:18 a.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Feb. 6, 2015, 5:18 a.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp-jsmith incubator-aurora (yasumoto/thermos_test)]$ ./pants test.pytest ./src/test/python/apache/thermos/monitoring:test_resource
> 
> 21:15:56 00:00 [main]
>                (To run a reporting server: ./pants server)
> 21:15:56 00:00   [bootstrap]
> 21:15:57 00:01   [setup]
> 21:15:57 00:01     [parse]
>                Executing tasks in goals: bootstrap -> imports -> gen -> check-exclusives -> resolve -> compile -> resources -> test
> 21:15:57 00:01   [bootstrap]
> 21:15:57 00:01     [bootstrap-jvm-tools]
> 21:15:57 00:01   [imports]
> 21:15:57 00:01     [ivy-imports]
> 21:15:57 00:01   [gen]
> 21:15:57 00:01     [thrift]
> 21:15:57 00:01     [scrooge]
> 21:15:57 00:01     [protoc]
> 21:15:57 00:01     [antlr]
> 21:15:57 00:01     [ragel]
> 21:15:57 00:01     [jaxb]
> 21:15:57 00:01     [wire]
> 21:15:57 00:01     [aapt]
> 21:15:57 00:01   [check-exclusives]
> 21:15:57 00:01     [check-exclusives]
> 21:15:57 00:01   [resolve]
> 21:15:57 00:01     [ivy]
> 21:15:57 00:01   [compile]
> 21:15:57 00:01     [jvm]
> 21:15:57 00:01       [jvm-compilers]
> 21:15:57 00:01   [resources]
> 21:15:57 00:01     [prepare]
> 21:15:57 00:01   [test]
> 21:15:57 00:01     [run_prep_command]
> 21:15:57 00:01     [pytest]
> 21:15:57 00:01       [run]
>                      ============== test session starts ===============
>                      platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
>                      plugins: cov, timeout
>                      collected 5 items 
>                      
>                      src/test/python/apache/thermos/monitoring/test_resource.py .....
>                      
>                      ============ 5 passed in 0.18 seconds ============
>                      
> 21:16:04 00:08     [junit]
> 21:16:04 00:08     [specs]
>                SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/
-----------------------------------------------------------

(Updated Feb. 5, 2015, 9:18 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
-------

Add a missing assert


Repository: aurora


Description
-------

Add a test for the thermos resource module


Diffs (updated)
-----

  src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
  src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
  src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 

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


Testing
-------

[tw-mbp-jsmith incubator-aurora (yasumoto/thermos_test)]$ ./pants test.pytest ./src/test/python/apache/thermos/monitoring:test_resource

21:15:56 00:00 [main]
               (To run a reporting server: ./pants server)
21:15:56 00:00   [bootstrap]
21:15:57 00:01   [setup]
21:15:57 00:01     [parse]
               Executing tasks in goals: bootstrap -> imports -> gen -> check-exclusives -> resolve -> compile -> resources -> test
21:15:57 00:01   [bootstrap]
21:15:57 00:01     [bootstrap-jvm-tools]
21:15:57 00:01   [imports]
21:15:57 00:01     [ivy-imports]
21:15:57 00:01   [gen]
21:15:57 00:01     [thrift]
21:15:57 00:01     [scrooge]
21:15:57 00:01     [protoc]
21:15:57 00:01     [antlr]
21:15:57 00:01     [ragel]
21:15:57 00:01     [jaxb]
21:15:57 00:01     [wire]
21:15:57 00:01     [aapt]
21:15:57 00:01   [check-exclusives]
21:15:57 00:01     [check-exclusives]
21:15:57 00:01   [resolve]
21:15:57 00:01     [ivy]
21:15:57 00:01   [compile]
21:15:57 00:01     [jvm]
21:15:57 00:01       [jvm-compilers]
21:15:57 00:01   [resources]
21:15:57 00:01     [prepare]
21:15:57 00:01   [test]
21:15:57 00:01     [run_prep_command]
21:15:57 00:01     [pytest]
21:15:57 00:01       [run]
                     ============== test session starts ===============
                     platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 5 items 
                     
                     src/test/python/apache/thermos/monitoring/test_resource.py .....
                     
                     ============ 5 passed in 0.18 seconds ============
                     
21:16:04 00:08     [junit]
21:16:04 00:08     [specs]
               SUCCESS


Thanks,

Joe Smith


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/
-----------------------------------------------------------

(Updated Feb. 5, 2015, 9:16 p.m.)


Review request for Aurora and Kevin Sweeney.


Changes
-------

Kevin + Bill's suggestion


Repository: aurora


Description
-------

Add a test for the thermos resource module


Diffs (updated)
-----

  src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
  src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
  src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 

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


Testing
-------

[tw-mbp-jsmith incubator-aurora (yasumoto/thermos_test)]$ ./pants test.pytest ./src/test/python/apache/thermos/monitoring:test_resource

21:15:56 00:00 [main]
               (To run a reporting server: ./pants server)
21:15:56 00:00   [bootstrap]
21:15:57 00:01   [setup]
21:15:57 00:01     [parse]
               Executing tasks in goals: bootstrap -> imports -> gen -> check-exclusives -> resolve -> compile -> resources -> test
21:15:57 00:01   [bootstrap]
21:15:57 00:01     [bootstrap-jvm-tools]
21:15:57 00:01   [imports]
21:15:57 00:01     [ivy-imports]
21:15:57 00:01   [gen]
21:15:57 00:01     [thrift]
21:15:57 00:01     [scrooge]
21:15:57 00:01     [protoc]
21:15:57 00:01     [antlr]
21:15:57 00:01     [ragel]
21:15:57 00:01     [jaxb]
21:15:57 00:01     [wire]
21:15:57 00:01     [aapt]
21:15:57 00:01   [check-exclusives]
21:15:57 00:01     [check-exclusives]
21:15:57 00:01   [resolve]
21:15:57 00:01     [ivy]
21:15:57 00:01   [compile]
21:15:57 00:01     [jvm]
21:15:57 00:01       [jvm-compilers]
21:15:57 00:01   [resources]
21:15:57 00:01     [prepare]
21:15:57 00:01   [test]
21:15:57 00:01     [run_prep_command]
21:15:57 00:01     [pytest]
21:15:57 00:01       [run]
                     ============== test session starts ===============
                     platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 5 items 
                     
                     src/test/python/apache/thermos/monitoring/test_resource.py .....
                     
                     ============ 5 passed in 0.18 seconds ============
                     
21:16:04 00:08     [junit]
21:16:04 00:08     [specs]
               SUCCESS


Thanks,

Joe Smith


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Joe Smith <ya...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/
-----------------------------------------------------------

(Updated Feb. 5, 2015, 9:16 p.m.)


Review request for Aurora and Kevin Sweeney.


Repository: aurora


Description
-------

Add a test for the thermos resource module


Diffs
-----

  src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
  src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
  src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 

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


Testing (updated)
-------

[tw-mbp-jsmith incubator-aurora (yasumoto/thermos_test)]$ ./pants test.pytest ./src/test/python/apache/thermos/monitoring:test_resource

21:15:56 00:00 [main]
               (To run a reporting server: ./pants server)
21:15:56 00:00   [bootstrap]
21:15:57 00:01   [setup]
21:15:57 00:01     [parse]
               Executing tasks in goals: bootstrap -> imports -> gen -> check-exclusives -> resolve -> compile -> resources -> test
21:15:57 00:01   [bootstrap]
21:15:57 00:01     [bootstrap-jvm-tools]
21:15:57 00:01   [imports]
21:15:57 00:01     [ivy-imports]
21:15:57 00:01   [gen]
21:15:57 00:01     [thrift]
21:15:57 00:01     [scrooge]
21:15:57 00:01     [protoc]
21:15:57 00:01     [antlr]
21:15:57 00:01     [ragel]
21:15:57 00:01     [jaxb]
21:15:57 00:01     [wire]
21:15:57 00:01     [aapt]
21:15:57 00:01   [check-exclusives]
21:15:57 00:01     [check-exclusives]
21:15:57 00:01   [resolve]
21:15:57 00:01     [ivy]
21:15:57 00:01   [compile]
21:15:57 00:01     [jvm]
21:15:57 00:01       [jvm-compilers]
21:15:57 00:01   [resources]
21:15:57 00:01     [prepare]
21:15:57 00:01   [test]
21:15:57 00:01     [run_prep_command]
21:15:57 00:01     [pytest]
21:15:57 00:01       [run]
                     ============== test session starts ===============
                     platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
                     plugins: cov, timeout
                     collected 5 items 
                     
                     src/test/python/apache/thermos/monitoring/test_resource.py .....
                     
                     ============ 5 passed in 0.18 seconds ============
                     
21:16:04 00:08     [junit]
21:16:04 00:08     [specs]
               SUCCESS


Thanks,

Joe Smith


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/#review62604
-----------------------------------------------------------


update or discard?

- Kevin Sweeney


On Oct. 24, 2014, 5:12 p.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2014, 5:12 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
> Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
> plugins: cov, timeout
> collected 5 items 
> 
> src/test/python/apache/thermos/monitoring/test_resource.py .....
> 
> ================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
> src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Joe Smith <ya...@gmail.com>.

> On Oct. 27, 2014, 12:46 p.m., Kevin Sweeney wrote:
> > src/test/python/apache/thermos/monitoring/test_resource.py, line 64
> > <https://reviews.apache.org/r/27182/diff/1/?file=733141#file733141line64>
> >
> >     patching a private method assumes intimate knowledge of the class under test and suggests refactoring

Not quite- if this were for a different test then I'd agree, but since we're actually testing TaskResourceMonitor, we'll want to mock out that behavior (and test it separately) to ensure this method is using it right.

(At some point in the TestTaskResourceMonitor we'll need to mock out this behavior- so there will always be a patch around this spot)


- Joe


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


On Oct. 24, 2014, 5:12 p.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2014, 5:12 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
> Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
> plugins: cov, timeout
> collected 5 items 
> 
> src/test/python/apache/thermos/monitoring/test_resource.py .....
> 
> ================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
> src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Joe Smith <ya...@gmail.com>.

> On Oct. 27, 2014, 12:46 p.m., Kevin Sweeney wrote:
> > src/test/python/apache/thermos/monitoring/test_resource.py, line 64
> > <https://reviews.apache.org/r/27182/diff/1/?file=733141#file733141line64>
> >
> >     patching a private method assumes intimate knowledge of the class under test and suggests refactoring
> 
> Joe Smith wrote:
>     Not quite- if this were for a different test then I'd agree, but since we're actually testing TaskResourceMonitor, we'll want to mock out that behavior (and test it separately) to ensure this method is using it right.
>     
>     (At some point in the TestTaskResourceMonitor we'll need to mock out this behavior- so there will always be a patch around this spot)
> 
> Bill Farner wrote:
>     I agree with Kevin, patching a private method is an encapsulation violation, it should be used as a last resort.  Consider, for example, if the true implementation of `_get_active_processes` handled internal state in a way that is expected to be consistent with other methods in the class.  Swapping out the behavior compromises the encapsulation put in place.
>     
>     In this case, you should be mocking `TaskMonitor`, the external interface consumed by the class, to supply behavior for `get_active_processes()`.

Done


- Joe


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


On Feb. 5, 2015, 9:16 p.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Feb. 5, 2015, 9:16 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp-jsmith incubator-aurora (yasumoto/thermos_test)]$ ./pants test.pytest ./src/test/python/apache/thermos/monitoring:test_resource
> 
> 21:15:56 00:00 [main]
>                (To run a reporting server: ./pants server)
> 21:15:56 00:00   [bootstrap]
> 21:15:57 00:01   [setup]
> 21:15:57 00:01     [parse]
>                Executing tasks in goals: bootstrap -> imports -> gen -> check-exclusives -> resolve -> compile -> resources -> test
> 21:15:57 00:01   [bootstrap]
> 21:15:57 00:01     [bootstrap-jvm-tools]
> 21:15:57 00:01   [imports]
> 21:15:57 00:01     [ivy-imports]
> 21:15:57 00:01   [gen]
> 21:15:57 00:01     [thrift]
> 21:15:57 00:01     [scrooge]
> 21:15:57 00:01     [protoc]
> 21:15:57 00:01     [antlr]
> 21:15:57 00:01     [ragel]
> 21:15:57 00:01     [jaxb]
> 21:15:57 00:01     [wire]
> 21:15:57 00:01     [aapt]
> 21:15:57 00:01   [check-exclusives]
> 21:15:57 00:01     [check-exclusives]
> 21:15:57 00:01   [resolve]
> 21:15:57 00:01     [ivy]
> 21:15:57 00:01   [compile]
> 21:15:57 00:01     [jvm]
> 21:15:57 00:01       [jvm-compilers]
> 21:15:57 00:01   [resources]
> 21:15:57 00:01     [prepare]
> 21:15:57 00:01   [test]
> 21:15:57 00:01     [run_prep_command]
> 21:15:57 00:01     [pytest]
> 21:15:57 00:01       [run]
>                      ============== test session starts ===============
>                      platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
>                      plugins: cov, timeout
>                      collected 5 items 
>                      
>                      src/test/python/apache/thermos/monitoring/test_resource.py .....
>                      
>                      ============ 5 passed in 0.18 seconds ============
>                      
> 21:16:04 00:08     [junit]
> 21:16:04 00:08     [specs]
>                SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Bill Farner <wf...@apache.org>.

> On Oct. 27, 2014, 7:46 p.m., Kevin Sweeney wrote:
> > src/test/python/apache/thermos/monitoring/test_resource.py, line 64
> > <https://reviews.apache.org/r/27182/diff/1/?file=733141#file733141line64>
> >
> >     patching a private method assumes intimate knowledge of the class under test and suggests refactoring
> 
> Joe Smith wrote:
>     Not quite- if this were for a different test then I'd agree, but since we're actually testing TaskResourceMonitor, we'll want to mock out that behavior (and test it separately) to ensure this method is using it right.
>     
>     (At some point in the TestTaskResourceMonitor we'll need to mock out this behavior- so there will always be a patch around this spot)

I agree with Kevin, patching a private method is an encapsulation violation, it should be used as a last resort.  Consider, for example, if the true implementation of `_get_active_processes` handled internal state in a way that is expected to be consistent with other methods in the class.  Swapping out the behavior compromises the encapsulation put in place.

In this case, you should be mocking `TaskMonitor`, the external interface consumed by the class, to supply behavior for `get_active_processes()`.


- Bill


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


On Oct. 25, 2014, 12:12 a.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2014, 12:12 a.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
> Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
> plugins: cov, timeout
> collected 5 items 
> 
> src/test/python/apache/thermos/monitoring/test_resource.py .....
> 
> ================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
> src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Kevin Sweeney <ke...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/#review58668
-----------------------------------------------------------



src/test/python/apache/thermos/monitoring/test_resource.py
<https://reviews.apache.org/r/27182/#comment99741>

    patching a private method assumes intimate knowledge of the class under test and suggests refactoring


- Kevin Sweeney


On Oct. 24, 2014, 5:12 p.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Oct. 24, 2014, 5:12 p.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
> Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
> plugins: cov, timeout
> collected 5 items 
> 
> src/test/python/apache/thermos/monitoring/test_resource.py .....
> 
> ================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
> src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>


Re: Review Request 27182: Add a test for the thermos resource module

Posted by Aurora ReviewBot <wf...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/27182/#review58473
-----------------------------------------------------------


+1: Master (3778330) is green with this patch.
  ./build-support/jenkins/build.sh

- Aurora ReviewBot


On Oct. 25, 2014, 12:12 a.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/27182/
> -----------------------------------------------------------
> 
> (Updated Oct. 25, 2014, 12:12 a.m.)
> 
> 
> Review request for Aurora and Kevin Sweeney.
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test for the thermos resource module
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/thermos/monitoring/monitor.py 8f87f5ffc39c87e87ff78b941ea30df7138bd1ef 
>   src/test/python/apache/thermos/monitoring/BUILD 33d6bba43aff6d62b2646491f004475c27ed99db 
>   src/test/python/apache/thermos/monitoring/test_resource.py PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/27182/diff/
> 
> 
> Testing
> -------
> 
> [tw-mbp13-jsmith aurora (yasumoto/psutil_2.1.3)]$ ./pants ./src/test/python/apache/thermos/monitoring:test_resource
> Build operating on top level addresses: set([BuildFileAddress(/Users/jsmith/workspace/aurora/src/test/python/apache/thermos/monitoring/BUILD, test_resource)])
> ==================================================================================================================================================== test session starts =====================================================================================================================================================
> platform darwin -- Python 2.7.6 -- py-1.4.26 -- pytest-2.6.4
> plugins: cov, timeout
> collected 5 items 
> 
> src/test/python/apache/thermos/monitoring/test_resource.py .....
> 
> ================================================================================================================================================== 5 passed in 0.21 seconds ==================================================================================================================================================
> src.test.python.apache.thermos.monitoring.test_resource                         .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>