another attempt at fixing test_ss on pypy
@@ -121,7 +121,9 @@ content-type:text/plain
listener.wait_for_heartbeat()
headers, body = listener.get_latest_message()
- assert expected_heartbeat_count == listener.heartbeat_count
+ time.sleep(2)
+
+ assert expected_heartbeat_count == listener.heartbeat_count, "(2) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
assert {"content-type": "text/plain"} == headers
assert message_body == body
@@ -138,7 +140,9 @@ content-type:text/plain
listener.wait_for_message()
headers, body = listener.get_latest_message()
- assert expected_heartbeat_count == listener.heartbeat_count, "(2) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
+ time.sleep(2)
+
+ assert expected_heartbeat_count == listener.heartbeat_count, "(3) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
assert {"content-type": "text/plain"} == headers
assert message_body == body
@@ -155,7 +159,9 @@ content-type:text/plain
listener.wait_for_heartbeat()
headers, body = listener.get_latest_message()
- assert expected_heartbeat_count == listener.heartbeat_count, "(3) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
+ time.sleep(2)
+
+ assert expected_heartbeat_count == listener.heartbeat_count, "(4) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
assert {"content-type": "text/plain"} == headers
assert message_body == body
@@ -180,9 +186,9 @@ content-length:%s
listener.wait_for_heartbeat()
headers, body = listener.get_latest_message()
- time.sleep(1)
+ time.sleep(2)
- assert expected_heartbeat_count == listener.heartbeat_count, "(4) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
+ assert expected_heartbeat_count == listener.heartbeat_count, "(5) expected heartbeat count %s, was %s" % (expected_heartbeat_count, listener.heartbeat_count)
assert {
"content-type": "text/plain",
"content-length": str(len(message_body)),
