|
@@ -59,6 +59,18 @@ class test_WorkerComponent:
|
|
|
w.register_with_event_loop(parent, Mock(name='loop'))
|
|
|
assert parent.consumer.on_task_message
|
|
|
|
|
|
+ def test_info_without_event_loop(self):
|
|
|
+ parent = Mock(name='parent')
|
|
|
+ parent.autoscale = True
|
|
|
+ parent.max_concurrency = '10'
|
|
|
+ parent.min_concurrency = '2'
|
|
|
+ parent.use_eventloop = False
|
|
|
+ w = autoscale.WorkerComponent(parent)
|
|
|
+ w.create(parent)
|
|
|
+ info = w.info(parent)
|
|
|
+ assert 'autoscaler' in info
|
|
|
+ assert parent.autoscaler_cls().info.called
|
|
|
+
|
|
|
|
|
|
class test_Autoscaler:
|
|
|
|