Fix ccrfilter_global

Made sure that the inserted row is replicated before inserting another
one. Shortened the test so that slower systems finish it within a
reasonable time. Increased the time that the writes are routed to the
master.
This commit is contained in:
Markus Mäkelä 2019-11-05 12:52:26 +02:00
parent aafea9b030
commit 0a897aa839
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
2 changed files with 5 additions and 2 deletions

View File

@ -18,7 +18,7 @@ int main(int argc, char* argv[])
auto secondary = test.maxscales->rwsplit();
secondary.connect();
for (int i = 0; i < 50; i++)
for (int i = 0; i < 25; i++)
{
conn.connect();
test.expect(conn.query("INSERT INTO test.t1 VALUES ('" + data + "')"),
@ -34,6 +34,9 @@ int main(int argc, char* argv[])
// Existing connections should also see the inserted rows
auto second_count = std::stoi(secondary.field("SELECT COUNT(*) FROM test.t1"));
test.expect(second_count == i + 1, "Missing `%d` rows from open connection.", (i + 1) - count);
// Make sure the row is replicated before inserting another one
test.repl->sync_slaves();
}
conn.connect();

View File

@ -17,7 +17,7 @@ monitor_interval=1000
[ccrfilter]
type=filter
module=ccrfilter
time=5
time=10
global=true
# RWSplit