Add OK packet processing test
Added a test case which exercises the OK packet handling in readwritesplit.
This commit is contained in:
parent
c70e1431e3
commit
f2afa5380b
@ -295,6 +295,9 @@ add_test_script(load_balancing_pers10 load_balancing load_pers10 LABELS readwrit
|
||||
# Test with extremely big blob inserting
|
||||
add_test_executable(longblob.cpp longblob longblob LABELS readwritesplit readconnroute UNSTABLE HEAVY REPL_BACKEND)
|
||||
|
||||
# Check that inserts of specific size don't cause a hang
|
||||
add_test_executable(large_insert_hang.cpp large_insert_hang replication LABELS readwritesplit REPL_BACKEND)
|
||||
|
||||
# Test with extremely big blob inserting/selecting with > 16 mb data blocks
|
||||
add_test_executable(mxs1110_16mb.cpp mxs1110_16mb longblob_filters LABELS readwritesplit readconnroute HEAVY REPL_BACKEND)
|
||||
|
||||
|
28
maxscale-system-test/large_insert_hang.cpp
Normal file
28
maxscale-system-test/large_insert_hang.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/**
|
||||
* Check that the OK packet flags are read correctly
|
||||
*/
|
||||
|
||||
#include "testconnections.h"
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
TestConnections test(argc, argv);
|
||||
test.set_timeout(60);
|
||||
|
||||
test.connect_maxscale();
|
||||
test.try_query(test.conn_rwsplit, "CREATE OR REPLACE TABLE test.t1(id int)");
|
||||
|
||||
std::stringstream ss;
|
||||
ss << "INSERT INTO test.t1 VALUES (0)";
|
||||
|
||||
for (int i = 0; i < 2299; i++)
|
||||
{
|
||||
ss << ",(" << i << ")";
|
||||
}
|
||||
|
||||
test.try_query(test.conn_rwsplit, query.str().c_str());
|
||||
test.try_query(test.conn_rwsplit, "DROP TABLE test.t1");
|
||||
test.close_maxscale_connections();
|
||||
|
||||
return test.global_result;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user