check-mirroring: Don't fail when messages get reordered.
This happens sometimes (especially when our server is restarting), and isn't a _real_ problem -- it's much more important that we have a completely reliable test that we can put a Nagios alert against. (imported from commit 0add0b3dfc5447307014bbb9137366bd7141ade0)
This commit is contained in:
parent
1dba0c0344
commit
f3cdfd2e4d
|
@ -107,10 +107,8 @@ else:
|
||||||
if len(notices) != 4:
|
if len(notices) != 4:
|
||||||
print "humbug=>zephyr: Got wrong number of messages back!"
|
print "humbug=>zephyr: Got wrong number of messages back!"
|
||||||
failed = True
|
failed = True
|
||||||
elif (notices[0].message.split('\0')[1] != str(hzkey1) or
|
elif (set(notice.message.split('\0')[1] for notice in notices) !=
|
||||||
notices[1].message.split('\0')[1] != str(hzkey2) or
|
set([str(hzkey1), str(hzkey2), str(zhkey1), str(zhkey2)])):
|
||||||
notices[2].message.split('\0')[1] != str(zhkey1) or
|
|
||||||
notices[3].message.split('\0')[1] != str(zhkey2)):
|
|
||||||
print "humbug=>zephyr: Didn't get back right values!"
|
print "humbug=>zephyr: Didn't get back right values!"
|
||||||
failed = True
|
failed = True
|
||||||
if failed:
|
if failed:
|
||||||
|
@ -125,10 +123,8 @@ else:
|
||||||
for message in messages:
|
for message in messages:
|
||||||
print_humbug(message)
|
print_humbug(message)
|
||||||
failed = True
|
failed = True
|
||||||
elif (messages[0]['content'] != str(hzkey1) or
|
elif (set(message["content"] for message in messages) !=
|
||||||
messages[1]['content'] != str(hzkey2) or
|
set([str(hzkey1), str(hzkey2), str(zhkey1), str(zhkey2)])):
|
||||||
messages[2]['content'] != str(zhkey1) or
|
|
||||||
messages[3]['content'] != str(zhkey2)):
|
|
||||||
print "zephyr=>humbug: Didn't get back right values!"
|
print "zephyr=>humbug: Didn't get back right values!"
|
||||||
for message in messages:
|
for message in messages:
|
||||||
print_humbug(message)
|
print_humbug(message)
|
||||||
|
|
Loading…
Reference in a new issue