pid_file = t.name + ".pid"
- if t.isAlive():
+ if t.is_alive():
cmd = ["kill `cat " + pid_file + "`"]
self.execute(cmd)
# try again
self.thread_wait(t, 5)
- if t.isAlive():
+ if t.is_alive():
cmd = ["kill `cat " + pid_file + "`"]
self.execute(cmd)
# try with -9
self.thread_wait(t, 5)
- if t.isAlive():
+ if t.is_alive():
cmd = ["kill -9 `cat " + pid_file + "`"]
self.execute(cmd)
self.thread_wait(t, 5)
- if t.isAlive():
+ if t.is_alive():
raise Exception("thread still alive")
self.execute(["rm", pid_file])
wait_str = str(wait) + "s"
logger.debug(self.name + " thread_wait(" + wait_str + "): ")
- if t.isAlive():
+ if t.is_alive():
t.join(wait)
def pending(self, s, timeout=0):
def ping_wait(host, thread, timeout=None):
host.thread_wait(thread, timeout)
- if thread.isAlive():
+ if thread.is_alive():
raise Exception("ping thread still alive")
def flush_arp_cache(host):
def iperf_wait(server, client, server_thread, client_thread, timeout=None, iperf="iperf"):
client.thread_wait(client_thread, timeout)
- if client_thread.isAlive():
+ if client_thread.is_alive():
raise Exception("iperf client thread still alive")
server.thread_wait(server_thread, 5)
- if server_thread.isAlive():
+ if server_thread.is_alive():
server.execute(["killall", "-s", "INT", iperf])
time.sleep(1)
server.thread_wait(server_thread, 5)
- if server_thread.isAlive():
+ if server_thread.is_alive():
raise Exception("iperf server thread still alive")
return