add tests

This commit is contained in:
Timofey Turenko
2017-05-17 18:16:06 +03:00
committed by Markus Mäkelä
parent dbfd631fed
commit 8c6ca38a8a
594 changed files with 48376 additions and 0 deletions

View File

@ -0,0 +1,30 @@
/**
* @file mxs47.cpp Regression test for bug MXS-47 ("Session freeze when small tail packet")
* - execute SELECT REPEAT('a',i), where 'i' is changing from 1 to 3000 with stride of 7 using readwritesplit
*/
#include <iostream>
#include "testconnections.h"
int main(int argc, char *argv[])
{
TestConnections test(argc, argv);
int iterations = 5000;
test.tprintf("Executing `SELECT REPEAT('a', X );` for X = 0..%d with a stride of 7", iterations);
test.connect_maxscale();
for (int i = 1; i < iterations; i += 7)
{
char str[1024];
sprintf(str, "SELECT REPEAT('a',%d)", i);
test.set_timeout(15);
test.try_query(test.conn_rwsplit, str);
}
test.close_maxscale_connections();
return test.global_result;
}