Skip to content

Commit

Permalink
fix fleet dist infer ut
Browse files Browse the repository at this point in the history
Change-Id: I1a6ce26a8092772297eb5578d1fee0478a36c559
  • Loading branch information
seiriosPlus committed May 26, 2021
1 parent 5533e91 commit c7aabfb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion python/paddle/fluid/tests/unittests/test_communicator_geo.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,19 +167,23 @@ def runTest(self):
_python = sys.executable

ps_cmd = "{} {}".format(_python, server_file)

ps_proc = subprocess.Popen(
ps_cmd.strip().split(" "),
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)

time.sleep(5)
outs, errs = ps_proc.communicate(timeout=15)

time.sleep(1)

os.environ["TRAINING_ROLE"] = "TRAINER"
os.environ["http_proxy"] = ""
os.environ["https_proxy"] = ""

self.run_ut()
ps_proc.kill()
ps_proc.wait()

if os.path.exists(server_file):
os.remove(server_file)
Expand Down

0 comments on commit c7aabfb

Please sign in to comment.