From 3a4242c276fc837ebe205148741a486a82937604 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Mon, 12 Aug 2019 15:26:35 +0100 Subject: [Test] Improve ssl test --- test/functional/lua/tcp.lua | 9 +++++++-- test/functional/util/dummy_ssl.py | 7 +++++-- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'test') 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, -- cgit v1.2.3