mirror of
https://git.proxmox.com/git/mirror_corosync
synced 2025-08-14 04:20:02 +00:00
CTS: fix some tests that didn't handle been called more than one
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
b1d65a7e8c
commit
f3387a8287
@ -438,7 +438,7 @@ class TestAgent(object):
|
||||
'''Tear down (undo) the given ScenarioComponent'''
|
||||
self.env.debug('test agent: stopping %s on node %s' % (self.binary, self.node))
|
||||
self.sock.close ()
|
||||
self.rsh(self.node, "killall " + self.binary + " 2>/dev/null")
|
||||
self.rsh(self.node, "killall -9 " + self.binary + " 2>/dev/null")
|
||||
self.started = False
|
||||
|
||||
def kill(self):
|
||||
|
@ -33,6 +33,7 @@ Copyright (c) 2010 Red Hat, Inc.
|
||||
# THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
import random
|
||||
import socket
|
||||
from UserDict import UserDict
|
||||
from cts.CTStests import *
|
||||
from corosync import CpgTestAgent
|
||||
@ -405,7 +406,6 @@ class CpgMsgOrderBase(CoroTest):
|
||||
ret = CoroTest.setup(self, node)
|
||||
|
||||
for n in self.CM.Env["nodes"]:
|
||||
self.total_num_msgs = self.total_num_msgs + self.num_msgs_per_node
|
||||
self.CM.cpg_agent[n].clean_start()
|
||||
self.CM.cpg_agent[n].cpg_join(self.name)
|
||||
self.CM.cpg_agent[n].record_messages()
|
||||
@ -420,6 +420,10 @@ class CpgMsgOrderBase(CoroTest):
|
||||
def wait_and_validate_order(self):
|
||||
msgs = {}
|
||||
|
||||
self.total_num_msgs = 0
|
||||
for n in self.CM.Env["nodes"]:
|
||||
self.total_num_msgs = self.total_num_msgs + self.num_msgs_per_node
|
||||
|
||||
for n in self.CM.Env["nodes"]:
|
||||
msgs[n] = []
|
||||
stopped = False
|
||||
@ -427,7 +431,11 @@ class CpgMsgOrderBase(CoroTest):
|
||||
|
||||
while len(msgs[n]) < self.total_num_msgs and waited < 360:
|
||||
|
||||
msg = self.CM.cpg_agent[n].read_messages(50)
|
||||
try:
|
||||
msg = self.CM.cpg_agent[n].read_messages(50)
|
||||
except:
|
||||
return self.failure('connection to test cpg_agent failed.')
|
||||
|
||||
if not msg == None:
|
||||
msgl = msg.split(";")
|
||||
|
||||
@ -878,6 +886,7 @@ class VoteQuorumGoDown(VoteQuorumBase):
|
||||
def __call__(self, node):
|
||||
self.incr("calls")
|
||||
|
||||
self.victims = []
|
||||
pats = []
|
||||
pats.append("%s .*VQ notification quorate: 0" % self.listener)
|
||||
pats.append("%s .*NQ notification quorate: 0" % self.listener)
|
||||
|
Loading…
Reference in New Issue
Block a user