Module: check_mk
Branch: master
Commit: baf44cc0e415a8389c513fe0051c53aa52b15524
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=baf44cc0e415a8…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Fri Jun 23 07:57:23 2017 +0200
Fixed load test
Change-Id: Ibe4996ea63739e73607e9eb67a29a633fe256255
---
tests/livestatus/test_liveproxyd.py | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/tests/livestatus/test_liveproxyd.py b/tests/livestatus/test_liveproxyd.py
index 043330d..565f736 100644
--- a/tests/livestatus/test_liveproxyd.py
+++ b/tests/livestatus/test_liveproxyd.py
@@ -173,14 +173,18 @@ def test_large_number_of_sites(default_cfg, site):
site.execute(["cmk", "-O"])
_change_liveproxyd_sites(site, liveproxyd_sites)
- live = livestatus.MultiSiteConnection(livestatus_api_sites)
- assert live.dead_sites() == {}
print livestatus_api_sites.keys()
def _num_connections_opened():
+ # Need to reconstruct the object on each call because connect is
+ # currently done in constructor :-/
+ live = livestatus.MultiSiteConnection(livestatus_api_sites)
+ assert live.dead_sites() == {}
+
live.set_prepend_site(True)
rows = live.query("GET status\nColumns: program_version\n")
live.set_prepend_site(False)
+
assert type(rows) == list
print [ r[0] for r in rows ]
return len(rows)
@@ -196,6 +200,5 @@ def test_large_number_of_sites(default_cfg, site):
"Liveproxyd sockets not opened after 60 seconds"
finally:
- #_use_liveproxyd_for_local_site(site, proto="unix")
- #site.delete_file("etc/check_mk/conf.d/liveproxyd-test.mk")
- pass
+ _use_liveproxyd_for_local_site(site, proto="unix")
+ site.delete_file("etc/check_mk/conf.d/liveproxyd-test.mk")