Adding timeout to stop the segment in the testcase.
Testcase was failing sometimes pg_ctl was failing with default timeout resulting into testcase failure. To make sure that the instance is stopped, added timeout of 120 seconds.
@@ -1206,7 +1206,7 @@ def stop_segments(context, where_clause):
# For demo_cluster tests that run on the CI gives the error 'bash: pg_ctl: command not found'
# Thus, need to add pg_ctl to the path when ssh'ing to a demo cluster.
subprocess.check_call(['ssh', seg.getSegmentHostName(),
- 'source %s/greenplum_path.sh && pg_ctl stop -m fast -D %s -w' % (
+ 'source %s/greenplum_path.sh && pg_ctl stop -m fast -D %s -w -t 120' % (
pipes.quote(os.environ.get("GPHOME")), pipes.quote(seg.getSegmentDataDirectory()))
])
