Change in vdsm[master]: test: customize destination for an event
piotr.kliczewski at gmail.com
piotr.kliczewski at gmail.com
Thu Jul 2 14:38:54 UTC 2015
Piotr Kliczewski has uploaded a new change for review.
Change subject: test: customize destination for an event
......................................................................
test: customize destination for an event
During test run we need to customize destinations where events are sent.
Change-Id: Ia9acf87891b3a45b5af5361d6fb0bc6882962eae
Signed-off-by: pkliczewski <piotr.kliczewski at gmail.com>
---
M tests/jsonRpcHelper.py
1 file changed, 6 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/68/43168/1
diff --git a/tests/jsonRpcHelper.py b/tests/jsonRpcHelper.py
index 4705a42..b456bff 100644
--- a/tests/jsonRpcHelper.py
+++ b/tests/jsonRpcHelper.py
@@ -47,8 +47,9 @@
class FakeClientIf(object):
log = logging.getLogger("FakeClientIf")
- def __init__(self, binding):
+ def __init__(self, binding, dest):
self.threadLocal = threading.local()
+ self.dest = dest
self.json_binding = binding
self.irs = True
self.gluster = None
@@ -72,11 +73,12 @@
def _send_notification(self, message):
server = self.json_binding.reactor.server
- server.send(message, LEGACY_SUBSCRIPTION_ID_RESPONSE)
+ server.send(message, self.dest)
@contextmanager
-def constructAcceptor(log, ssl, jsonBridge):
+def constructAcceptor(log, ssl, jsonBridge,
+ dest=LEGACY_SUBSCRIPTION_ID_RESPONSE):
sslctx = DEAFAULT_SSL_CONTEXT if ssl else None
reactor = Reactor()
acceptor = MultiProtocolAcceptor(
@@ -88,7 +90,7 @@
json_binding = BindingJsonRpc(jsonBridge, defaultdict(list), 60)
json_binding.start()
- cif = FakeClientIf(json_binding)
+ cif = FakeClientIf(json_binding, dest)
xml_binding = BindingXMLRPC(cif, cif.log)
xml_binding.start()
--
To view, visit https://gerrit.ovirt.org/43168
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia9acf87891b3a45b5af5361d6fb0bc6882962eae
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Piotr Kliczewski <piotr.kliczewski at gmail.com>
More information about the vdsm-patches
mailing list