commit 3a4242c: [Test] Improve ssl test
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Aug 12 15:56:04 UTC 2019
Author: Vsevolod Stakhov
Date: 2019-08-12 15:26:35 +0100
URL: https://github.com/rspamd/rspamd/commit/3a4242c276fc837ebe205148741a486a82937604
[Test] Improve ssl test
---
test/functional/lua/tcp.lua | 9 +++++++--
test/functional/util/dummy_ssl.py | 7 +++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/test/functional/lua/tcp.lua b/test/functional/lua/tcp.lua
index a43fcf2f0..dc26b2935 100644
--- a/test/functional/lua/tcp.lua
+++ b/test/functional/lua/tcp.lua
@@ -78,8 +78,13 @@ local function http_large_tcp_ssl_symbol(task)
if task:get_queue_id() == 'SSL Large TCP request' then
logger.errx(task, 'ssl_large_tcp_symbol: begin')
- for i = 1,2000 do
- data[i] = 'test\n'
+ for i = 1,10 do
+ local st = {}
+ for j=1,60000 do
+ st[j] = 't'
+ end
+ st[#st + 1] = '\n'
+ data[i] = table.concat(st)
end
rspamd_tcp:request({
diff --git a/test/functional/util/dummy_ssl.py b/test/functional/util/dummy_ssl.py
index 792844664..e150b151a 100755
--- a/test/functional/util/dummy_ssl.py
+++ b/test/functional/util/dummy_ssl.py
@@ -16,12 +16,15 @@ PID = "/tmp/dummy_ssl.pid"
class SSLTCPHandler(SocketServer.BaseRequestHandler):
def handle(self):
- data = self.request.recv(1024)
+ time.sleep(0.5)
+ data = self.request.recv(16384)
while data:
print "{} wrote:".format(self.client_address[0])
print data
+ time.sleep(0.1)
self.request.sendall(data)
- data = self.request.recv(1024)
+ time.sleep(0.1)
+ data = self.request.recv(16384)
class SSL_TCP_Server(SocketServer.TCPServer):
def __init__(self,
More information about the Commits
mailing list