Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

circus/tests: rename async argument of _create_circus() to use_async #1079

Merged
merged 1 commit into from
Sep 13, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions circus/tests/support.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def start_arbiter(self, cmd='support.run_process',
stdout_stream=None, debug=True, **kw):
testfile, arbiter = self._create_circus(
cmd, stdout_stream=stdout_stream,
debug=debug, async=True, **kw)
debug=debug, use_async=True, **kw)
self.test_file = testfile
self.arbiter = arbiter
self.arbiters.append(arbiter)
Expand Down Expand Up @@ -265,7 +265,7 @@ def get_tmpfile(self, content=None):

@classmethod
def _create_circus(cls, callable_path, plugins=None, stats=False,
async=False, arbiter_kw=None, **kw):
use_async=False, arbiter_kw=None, **kw):
fd, testfile = mkstemp()
os.close(fd)
wdir = os.path.dirname(os.path.dirname(os.path.dirname(
Expand All @@ -292,7 +292,7 @@ def _create_circus(cls, callable_path, plugins=None, stats=False,
arbiter_kw['stats_endpoint'] = "tcp://127.0.0.1:%d" % _gp()
arbiter_kw['statsd_close_outputs'] = not debug

if async:
if use_async:
arbiter_kw['background'] = False
arbiter_kw['loop'] = get_ioloop()
else:
Expand Down
2 changes: 1 addition & 1 deletion circus/tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def run_with_hooks(self, hooks):
self.stream = QueueStream()
self.errstream = QueueStream()
dummy_process = 'circus.tests.support.run_process'
return self._create_circus(dummy_process, async=True,
return self._create_circus(dummy_process, use_async=True,
stdout_stream={'stream': self.stream},
stderr_stream={'stream': self.errstream},
hooks=hooks)
Expand Down
4 changes: 2 additions & 2 deletions circus/tests/test_watcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ def run_with_hooks(self, hooks, streams=False):
return self._create_circus(dummy_process,
stdout_stream=stdout_stream,
stderr_stream=stderr_stream,
hooks=hooks, debug=True, async=True)
hooks=hooks, debug=True, use_async=True)

@tornado.gen.coroutine
def _stop(self):
Expand Down Expand Up @@ -601,7 +601,7 @@ class RespawnTest(TestCircus):
def test_not_respawning(self):
oneshot_process = 'circus.tests.test_watcher.oneshot_process'
testfile, arbiter = self._create_circus(oneshot_process,
respawn=False, async=True)
respawn=False, use_async=True)
yield arbiter.start()
watcher = arbiter.watchers[-1]
try:
Expand Down