Fix gpexpand flaky test cases
Each gpexpand test case need a new environment. Previous code uses pkill to make sure no postgres process remaining and then uses gpstop to double confirm. However, pkill to terminate cluster may over-kill some other postgres process on the hosts. What's more, the interface `Given a working directory of the test as '/data/gpdata/gpexpand'` will remove the directory which also remove the $MASTER_DATA_DIRECTORY, so the following `gpstop` is useless because $MASTER_DATA_DIRECTORY is gone. Also, this introduce race conditon. This commit removes pkill and use gpstop interface to build a clean environment for each test case. Also it makes sure that `gpstop` is invoked at the very beginning of each test case.
Showing
想要评论请 注册 或 登录