Interdiff that fixes unhelpful comment and adds a clarification:
diff --git a/test/ganeti.hypervisor.hv_kvm_unittest.py
b/test/ganeti.hypervisor.hv_kvm_unittest.py
index 8560a49..7ff3d4d 100755
--- a/test/ganeti.hypervisor.hv_kvm_unittest.py
+++ b/test/ganeti.hypervisor.hv_kvm_unittest.py
@@ -52,13 +52,12 @@ class QmpStub(threading.Thread):
def __init__(self, socket_filename, server_responses):
"""Creates a QMP stub
- - it checks each received message for JSON validity;
-
- - it plays back the list of messages given in the responses parameter
-
- @type filename: string
- @param filename: filename of the UNIX socket that will be created by this
- class and used for the communication
+ @type socket_filename: string
+ @param socket_filename: filename of the UNIX socket that will be created
+ this class and used for the communication
+ @type server_responses: list
+ @param server_responses: list of responses that the server sends
in response
+ to whatever it receives
"""
threading.Thread.__init__(self)
self.socket_filename = socket_filename
@@ -69,6 +68,8 @@ class QmpStub(threading.Thread):
self.socket.listen(1)
def run(self):
+ # Hypothesis: the messages we receive contain only a complete QMP message
+ # encoded in JSON.
conn, addr = self.socket.accept()
# Send the banner as the first thing