MXS-2337 Fix sharding test

There is now enought time between queries that the shard map is reconstructed.
This commit is contained in:
Esa Korhonen
2019-03-04 18:16:56 +02:00
parent 4208dff2e6
commit e7f739e95d
2 changed files with 3 additions and 1 deletions

View File

@ -17,6 +17,7 @@ user=maxskysql
password=skysql
auth_all_servers=1
ignore_databases_regex=.*
refresh_interval=5
[Sharding Listener]
type=listener

View File

@ -75,11 +75,11 @@ int main(int argc, char* argv[])
"GRANT SELECT,USAGE,CREATE ON shard_db.* TO 'user%d'@'%%'",
i),
"Query should succeed.");
execute_query(Test->repl->nodes[i], "FLUSH PRIVILEGES");
}
Test->repl->close_connections();
Test->stop_timeout();
sleep(10);
MYSQL* conn;
for (i = 0; i < Test->repl->N; i++)
@ -97,6 +97,7 @@ int main(int argc, char* argv[])
Test->add_result(execute_query(conn, "CREATE TABLE table%d (x1 int, fl int);", i),
"Query should succeed.");
}
sleep(6); // The router is configured to refresh the shard map if older than 5 seconds.
for (i = 0; i < Test->repl->N; i++)
{