MXS-2311: Test MXS-2311 in mxs827_write_timeout

By repeatedly doing reads instead of one read per second, it is more
likely that MXS-2311 is reproduced. This is still not a deterministic
process but in theory it can reproduce the problem.
This commit is contained in:
Markus Mäkelä 2019-02-08 15:03:06 +02:00
parent 46484b4e11
commit 3c5dd257fd
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 6 additions and 4 deletions

View File

@ -19,7 +19,7 @@ user=maxskysql
passwd=skysql
router_options=slave_selection_criteria=LEAST_GLOBAL_CONNECTIONS
max_slave_connections=1
connection_keepalive=5
connection_keepalive=1
[Read Connection Router Slave]
type=service

View File

@ -22,14 +22,16 @@ int main(int argc, char *argv[])
create_t1(Test->maxscales->conn_rwsplit[0]);
for (int i = 0; i < 30; i++)
Test->tprintf("Doing reads for 30 seconds");
time_t start = time(NULL);
while (time(NULL) - start < 30)
{
Test->tprintf("Trying query %d\n", i);
Test->set_timeout(10);
Test->try_query(Test->maxscales->conn_rwsplit[0], "SELECT 1");
sleep(1);
}
Test->tprintf("Doing one write");
Test->try_query(Test->maxscales->conn_rwsplit[0], "INSERT INTO t1 VALUES (1, 1)");
Test->check_maxscale_alive(0);