> On May 27, 2014, 6:38 p.m., Brian Wickman wrote:
> > src/test/python/apache/aurora/client/api/test_instance_watcher.py, line 19
> > <https://reviews.apache.org/r/21440/diff/4/?file=588632#file588632line19>
> >
> >     I don't think we can rely upon patching or subclassing _Event (an 
> > internal implementation detail) for testing.  it'd be better to just create 
> > duck-typed ClockEvent and NoWaitEvent with .wait and .is_set methods.  
> > these probably belong in twitter.common.testing but can be created a la 
> > carte for now.
> >     
> >     mba=science=; python3
> >     Python 3.3.3 (default, Apr 15 2014, 11:17:36) 
> >     [GCC 4.2.1 Compatible Apple Clang 4.0 ((tags/Apple/clang-421.0.60))] on 
> > darwin
> >     Type "help", "copyright", "credits" or "license" for more information.
> >     >>> from threading import _Event
> >     Traceback (most recent call last):
> >       File "<stdin>", line 1, in <module>
> >     ImportError: cannot import name _Event
> >     >>> 
> >

Done for the fakes. I was not able to make patch work with threading.Event 
though no matter what I tried (side_effect, return_value and etc.). Dropped a 
TODO to investigate a possible solution.


- Maxim


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


On May 23, 2014, 1:19 a.m., Maxim Khutornenko wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/21440/
> -----------------------------------------------------------
> 
> (Updated May 23, 2014, 1:19 a.m.)
> 
> 
> Review request for Aurora, Mark Chu-Carroll and Brian Wickman.
> 
> 
> Bugs: AURORA-350
>     https://issues.apache.org/jira/browse/AURORA-350
> 
> 
> Repository: aurora
> 
> 
> Description
> -------
> 
> The updater now spawns upto batch_size threads to process one instance per 
> thread. 
> 
> All mutating calls are multiplexed by the SchedulerMux to do batch 
> kill/add/restart calls. This is the first step towards a fully multiplexed 
> SchedulerProxy and is intended to mitigate LDAP/scheduler load.
> 
> 
> Diffs
> -----
> 
>   src/main/python/apache/aurora/client/api/instance_watcher.py 
> 8992b93d25ce71b5784bad24429fd32356f64763 
>   src/main/python/apache/aurora/client/api/job_monitor.py 
> a27f6fbbf38e981f259aea35c9bf979d2d9b1b87 
>   src/main/python/apache/aurora/client/api/scheduler_client.py 
> df9d7e0a170271298137e4279221f271d355e9c5 
>   src/main/python/apache/aurora/client/api/updater.py 
> e8692ea4fdf924fb1ea06803d5e7321340754442 
>   src/main/python/apache/aurora/client/api/updater_util.py 
> 5ea96cd2797c4957d05168fb7ba9f950fd82bbbf 
>   src/test/python/apache/aurora/client/api/test_instance_watcher.py 
> 09dda3bed6a5097f6dff8153249a7460a5b24d58 
>   src/test/python/apache/aurora/client/api/test_job_monitor.py 
> 3df042019d845421e5c8d79232ed865e342d44fc 
>   src/test/python/apache/aurora/client/api/test_updater.py 
> 03a14186646daede689ac77e2ab7144aa5a7fa14 
>   src/test/python/apache/aurora/client/cli/test_create.py 
> ba1d1fb7bfa8cd8a48942c236039fbd2ca171a1b 
>   src/test/python/apache/aurora/client/cli/test_kill.py 
> 3c8e72de5e04b3c7dc769579506dca750b1f3089 
>   src/test/python/apache/aurora/client/cli/test_restart.py 
> 68951fa9f2f62073dee5c2b5d12ea85b44aa11db 
>   src/test/python/apache/aurora/client/cli/test_update.py 
> a357c44c87065474bce47fa403ddd72625da072d 
>   src/test/python/apache/aurora/client/cli/util.py 
> ccb6ea51eb636c2c564a0ee1a0ba2d41707bd2ca 
>   src/test/python/apache/aurora/client/commands/test_create.py 
> 09a392f3a2375d782ffdd5ab8463a0f5827c392b 
>   src/test/python/apache/aurora/client/commands/test_kill.py 
> bc3b92bdfc7838b6a0671078ef315ccd707eb5a5 
>   src/test/python/apache/aurora/client/commands/test_restart.py 
> 18e90aa8731798daac5fb5700807ebe2eb794cf9 
>   src/test/python/apache/aurora/client/commands/test_update.py 
> 0b1e3498311d946631452e45ea2c7edb100dc43c 
>   src/test/python/apache/aurora/client/commands/util.py 
> 4e587f320c785b56f5812364d50946cb2b6f03dc 
>   src/test/python/apache/aurora/client/fake_scheduler_proxy.py 
> 6a1f78b97d67adab0cf00acc31f20c5d6197a508 
>   src/test/sh/org/apache/aurora/e2e/http/http_example.aurora 
> 80871273fc4d47558253e6b09c92724e8693bc11 
>   src/test/sh/org/apache/aurora/e2e/http/http_example_updated.aurora 
> fc723cf232ddbc10458fc394e37358c8523118c2 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh 
> 2b546f116446694eb7b0d772ae864d6d83012573 
>   src/test/sh/org/apache/aurora/e2e/test_end_to_end_v2.sh 
> 9b4a00bf54123fdbcf3f215e38e9807d17719d35 
> 
> Diff: https://reviews.apache.org/r/21440/diff/
> 
> 
> Testing
> -------
> 
> ./pants src/test/python:all
> src/test/sh/org/apache/aurora/e2e/test_end_to_end.sh
> 
> 
> Thanks,
> 
> Maxim Khutornenko
> 
>

Reply via email to