Created
February 13, 2015 22:02
-
-
Save tahmmee/50c4bcd4439177c8354c to your computer and use it in GitHub Desktop.
crash_before_reboot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def test_crash_just_before_restart(self): | |
vbucket = 0 | |
index = 0 | |
nodeA = self.servers[index] | |
self.load_docs(nodeA, 1000) | |
time.sleep(4) | |
# kill memcahced | |
assert self.kill_memcached(index) | |
# stop node | |
assert self.stop_node(index) | |
# start node | |
assert self.start_node(index) | |
# get logs | |
rest = RestConnection(nodeA) | |
logs = rest.get_logs(50, contains_text="Writing crash dump") | |
assert len(logs) > 0 | |
crash_log = logs[-1]['text'] | |
m = re.search(' /.*/n_'+str(index)+'/.*dmp', crash_log) | |
assert m is not None, "No dump statement in logs" | |
dmp_path = m.group(0).lstrip() | |
# verify dmp exists | |
assert os.access(dmp_path, os.R_OK) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment