MXS-2337 Fix sharding test
There is now enought time between queries that the shard map is reconstructed.
This commit is contained in:
@ -17,6 +17,7 @@ user=maxskysql
|
|||||||
password=skysql
|
password=skysql
|
||||||
auth_all_servers=1
|
auth_all_servers=1
|
||||||
ignore_databases_regex=.*
|
ignore_databases_regex=.*
|
||||||
|
refresh_interval=5
|
||||||
|
|
||||||
[Sharding Listener]
|
[Sharding Listener]
|
||||||
type=listener
|
type=listener
|
||||||
|
|||||||
@ -75,11 +75,11 @@ int main(int argc, char* argv[])
|
|||||||
"GRANT SELECT,USAGE,CREATE ON shard_db.* TO 'user%d'@'%%'",
|
"GRANT SELECT,USAGE,CREATE ON shard_db.* TO 'user%d'@'%%'",
|
||||||
i),
|
i),
|
||||||
"Query should succeed.");
|
"Query should succeed.");
|
||||||
|
execute_query(Test->repl->nodes[i], "FLUSH PRIVILEGES");
|
||||||
}
|
}
|
||||||
|
|
||||||
Test->repl->close_connections();
|
Test->repl->close_connections();
|
||||||
Test->stop_timeout();
|
Test->stop_timeout();
|
||||||
sleep(10);
|
|
||||||
|
|
||||||
MYSQL* conn;
|
MYSQL* conn;
|
||||||
for (i = 0; i < Test->repl->N; i++)
|
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),
|
Test->add_result(execute_query(conn, "CREATE TABLE table%d (x1 int, fl int);", i),
|
||||||
"Query should succeed.");
|
"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++)
|
for (i = 0; i < Test->repl->N; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user