Tweak the size of the message used in test_long so it can pass on Windows
diff --git a/OpenSSL/ssl/connection.c b/OpenSSL/ssl/connection.c
index 61d536a..d53f45c 100755
--- a/OpenSSL/ssl/connection.c
+++ b/OpenSSL/ssl/connection.c
@@ -382,14 +382,9 @@
return NULL;
do {
- printf("about to SSL_write\n");
- fflush(stdout);
MY_BEGIN_ALLOW_THREADS(self->tstate)
ret = SSL_write(self->ssl, buf, len);
MY_END_ALLOW_THREADS(self->tstate)
- printf("SSL_write returned %d\n", ret);
- fflush(stdout);
-
if (PyErr_Occurred())
{
flush_error_queue();
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 83b88ef..a54b464 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -3,7 +3,6 @@
"""
Unit tests for L{OpenSSL.SSL}.
"""
-import time
from errno import ECONNREFUSED, EINPROGRESS
from sys import platform
@@ -1101,21 +1100,13 @@
# On Windows, after 32k of bytes the write will block (forever - because
# no one is yet reading).
message ='x' * (1024 * 32 - 1) + 'y'
- z = time.time()
- def now():
- return time.time() - z
- print now(), 'Sending', len(message), 'bytes'
server.sendall(message)
- print now(), 'sent'
accum = []
received = 0
while received < len(message):
- print now(), 'receiving 1k'
bytes = client.recv(1024)
- print now(), 'received', len(bytes)
accum.append(bytes)
received += len(bytes)
- print now(), 'total', received
self.assertEquals(message, ''.join(accum))