Skip to content

Commit

Permalink
CBQE-6184: [2/n] CBQE-5801 delay kill 10 seconds so cbbackupmgr could…
Browse files Browse the repository at this point in the history
… start properly

Change-Id: I87a9b055accc4814cd42a558d419d7c408c3f273
Reviewed-on: http://review.couchbase.org/c/testrunner/+/132195
Reviewed-by: <pavithra.mahamani@couchbase.com>
Tested-by: Thuan Nguyen <soccon@gmail.com>
Reviewed-on: http://review.couchbase.org/c/testrunner/+/139677
Reviewed-by: James Lee <james.lee@couchbase.com>
Tested-by: Asad Zaidi <asad.zaidi@couchbase.com>
  • Loading branch information
saigon authored and Asad Zaidi committed Nov 5, 2020
1 parent 0d91f94 commit af49a3d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/remote/remote_util.py
Expand Up @@ -543,7 +543,9 @@ def stop_schedule_tasks(self):
output, error = self.execute_command("cmd /c schtasks /end /tn upgrademe")
self.log_command_output(output, error)

def kill_erlang(self, os="unix"):
def kill_erlang(self, os="unix", delay=0):
if delay:
time.sleep(delay)
if os == "windows":
o, r = self.execute_command("taskkill /F /T /IM epmd.exe*")
self.log_command_output(o, r)
Expand Down Expand Up @@ -3684,8 +3686,10 @@ def start_couchbase(self):



def pause_memcached(self, os="linux", timesleep=30):
def pause_memcached(self, os="linux", timesleep=30, delay=0):
log.info("*** pause memcached process ***")
if delay:
time.sleep(delay)
if os == "windows":
self.check_cmd("pssuspend")
cmd = "pssuspend $(tasklist | grep memcached | gawk '{printf $2}')"
Expand Down
4 changes: 2 additions & 2 deletions pytests/ent_backup_restore/enterprise_backup_restore_base.py
Expand Up @@ -1223,7 +1223,7 @@ def bk_with_memcached_crash_and_restart(self):
cb_version=self.cb_version,
num_shards=num_shards)
conn_bk = RemoteMachineShellConnection(self.backupset.cluster_host)
conn_bk.pause_memcached(timesleep=8)
conn_bk.pause_memcached(timesleep=8, delay=10)
conn_bk.unpause_memcached()
conn_bk.disconnect()
output = backup_result.result(timeout=600)
Expand Down Expand Up @@ -1271,7 +1271,7 @@ def bk_with_erlang_crash_and_restart(self):
cb_version=self.cb_version,
num_shards=num_shards)
conn = RemoteMachineShellConnection(self.backupset.cluster_host)
conn.kill_erlang()
conn.kill_erlang(delay=10)
conn.start_couchbase()
output = backup_result.result(timeout=700)
self.assertTrue(self._check_output("Backup successfully completed", output),
Expand Down

0 comments on commit af49a3d

Please sign in to comment.