diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 15:26:35 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-08-12 15:26:35 +0100 |
commit | 3a4242c276fc837ebe205148741a486a82937604 (patch) | |
tree | 2c989e940944f574f2ae4c8f653caadeaf576e0c | |
parent | f3bddfea281147dab005940558a61a4c23f259ba (diff) | |
download | rspamd-3a4242c276fc837ebe205148741a486a82937604.tar.gz rspamd-3a4242c276fc837ebe205148741a486a82937604.zip |
[Test] Improve ssl test
-rw-r--r-- | test/functional/lua/tcp.lua | 9 | ||||
-rwxr-xr-x | 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, |