Show More
@@ -11,10 +11,12 b'' | |||||
11 | # Imports |
|
11 | # Imports | |
12 | #------------------------------------------------------------------------------- |
|
12 | #------------------------------------------------------------------------------- | |
13 |
|
13 | |||
|
14 | import os | |||
14 | import tempfile |
|
15 | import tempfile | |
15 | import time |
|
16 | import time | |
16 | from subprocess import Popen, PIPE, STDOUT |
|
17 | from subprocess import Popen, PIPE, STDOUT | |
17 |
|
18 | |||
|
19 | from IPython.utils.path import get_ipython_dir | |||
18 | from IPython.parallel import Client |
|
20 | from IPython.parallel import Client | |
19 |
|
21 | |||
20 | processes = [] |
|
22 | processes = [] | |
@@ -24,9 +26,11 b' blackhole = tempfile.TemporaryFile()' | |||||
24 |
|
26 | |||
25 | def setup(): |
|
27 | def setup(): | |
26 | cp = Popen('ipcontroller --profile iptest -r --log-level 10 --log-to-file'.split(), stdout=blackhole, stderr=STDOUT) |
|
28 | cp = Popen('ipcontroller --profile iptest -r --log-level 10 --log-to-file'.split(), stdout=blackhole, stderr=STDOUT) | |
27 | time.sleep(1) |
|
29 | engine_json = os.path.join(get_ipython_dir(), 'cluster_iptest', 'security', 'ipcontroller-engine.json') | |
|
30 | client_json = os.path.join(get_ipython_dir(), 'cluster_iptest', 'security', 'ipcontroller-client.json') | |||
|
31 | while not os.path.exists(engine_json) and not os.path.exists(client_json): | |||
|
32 | time.sleep(0.1) | |||
28 | processes.append(cp) |
|
33 | processes.append(cp) | |
29 | time.sleep(.5) |
|
|||
30 | add_engines(1) |
|
34 | add_engines(1) | |
31 | c = Client(profile='iptest') |
|
35 | c = Client(profile='iptest') | |
32 | while not c.ids: |
|
36 | while not c.ids: |
General Comments 0
You need to be logged in to leave comments.
Login now