> On May 20, 2014, 6:34 p.m., Mark Chu-Carroll wrote:
> > src/main/python/apache/aurora/client/api/scheduler_client.py, line 87
> > <https://reviews.apache.org/r/21739/diff/1/?file=585799#file585799line87>
> >
> >     Not necessary, but you could just use a patch in the test, instead of 
> > changing this. 
> >     
> >     
> >
> 
> Joe Smith wrote:
>     I'm happy to, but kts has suggested I use this (more explicit) method 
> instead. I kinda appreciate this more explicit call out as well, mind if I 
> hang tight for his opinion?

I typically like to make time a parameter directly so that it's clear that time 
needs to be mocked in tests (since it typically results in tests that work fine 
but are slow). However, that convention hasn't been uniformly followed in this 
codebase so I'm fine either way.


- Kevin


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


On May 20, 2014, 4:57 p.m., Joe Smith wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21739/
> -----------------------------------------------------------
> 
> (Updated May 20, 2014, 4:57 p.m.)
> 
> 
> Review request for Aurora, Kevin Sweeney and Mark Chu-Carroll.
> 
> 
> Bugs: AURORA-453
>     https://issues.apache.org/jira/browse/AURORA-453
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> Add a test to catch regressions in scheduler_client connect_scheduler.
> 
> Tested with the previous diff found in https://reviews.apache.org/r/21735/
> 
> 
> [tw-172-25-139-200 aurora (master)]$ ./pants 
> ./src/test/python/apache/aurora/client/api:scheduler_client
> <snip>
>     def _connect_scheduler(host, port, clock=time):
> >     transport = THttpClient('http://%s:%s/api' % (host, port))
> E     TypeError: 'module' object is not callable
> 
> /var/folders/kk/_7jrv7jd0095tg5x9w1qd8mw0000gp/T/tmphtP8nk/apache/aurora/client/api/scheduler_client.py:88:
>  TypeError
> =======================================================================================================================================
>  1 failed, 47 passed, 1 skipped in 4.44 seconds 
> =======================================================================================================================================
> src.test.python.apache.aurora.client.api.scheduler_client                     
>   .....   FAILURE
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 
> c0089f6911e704a3f6e918ecaf6a8690c532a81f 
>   src/test/python/apache/aurora/client/api/BUILD 
> f0fa58fe7beec803f69f1f34c826e7ca0e0b177d 
>   src/test/python/apache/aurora/client/api/test_scheduler_client.py 
> 7bf2c327723833b547da0b09ba5ad9373a991ef4 
> 
> Diff: https://reviews.apache.org/r/21739/diff/
> 
> 
> Testing
> -------
> 
> [tw-172-25-139-200 aurora (master)]$ ./pants 
> ./src/test/python/apache/aurora/client/api:scheduler_client
> Build operating on targets: 
> OrderedSet([PythonTests(src/test/python/apache/aurora/client/api/BUILD:scheduler_client)])
> ====================================================================================================================================================
>  test session starts 
> =====================================================================================================================================================
> platform darwin -- Python 2.6.8 -- py-1.4.20 -- pytest-2.5.2
> plugins: cov
> collected 48 items / 1 skipped 
> 
> src/test/python/apache/aurora/client/api/test_scheduler_client.py 
> ................................................
> 
> ============================================================================================================================================
>  48 passed, 1 skipped in 4.53 seconds 
> ============================================================================================================================================
> src.test.python.apache.aurora.client.api.scheduler_client                     
>   .....   SUCCESS
> 
> 
> Thanks,
> 
> Joe Smith
> 
>

Reply via email to