提交 5569b924 编写于 作者: J Jacob Champion

cs_walrep_2: fix races in test_negative

pg_ctl and gpstart appear to be running simultaneously, because we're
not waiting for pg_ctl to finish before moving to the next call.
(subprocess.Popen() doesn't return the process's return code -- it
returns a Popen instance.)

cs_walrep_2 in the master pipeline is currently failing roughly 50% of
the time due to a crash during test_negative. Let's see if this helps at
all.
上级 73af772d
......@@ -123,7 +123,7 @@ class neg_test(StandbyRunMixin, MPPTestCase):
os.remove(os.path.join(orig_master.datadir,'recovery.conf'))
logger.info('Stop the original master again...')
rc = subprocess.Popen('pg_ctl stop -D ' + orig_master.datadir + ' -m immediate',
subprocess.check_call('pg_ctl stop -D ' + orig_master.datadir + ' -m immediate',
shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
# Perform gpstart to get the original master (& cluster) back again
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册