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:
@ -18,7 +18,7 @@ int main(int argc, char* argv[])
|
|||||||
auto secondary = test.maxscales->rwsplit();
|
auto secondary = test.maxscales->rwsplit();
|
||||||
secondary.connect();
|
secondary.connect();
|
||||||
|
|
||||||
for (int i = 0; i < 50; i++)
|
for (int i = 0; i < 25; i++)
|
||||||
{
|
{
|
||||||
conn.connect();
|
conn.connect();
|
||||||
test.expect(conn.query("INSERT INTO test.t1 VALUES ('" + data + "')"),
|
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
|
// Existing connections should also see the inserted rows
|
||||||
auto second_count = std::stoi(secondary.field("SELECT COUNT(*) FROM test.t1"));
|
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);
|
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();
|
conn.connect();
|
||||||
|
@ -17,7 +17,7 @@ monitor_interval=1000
|
|||||||
[ccrfilter]
|
[ccrfilter]
|
||||||
type=filter
|
type=filter
|
||||||
module=ccrfilter
|
module=ccrfilter
|
||||||
time=5
|
time=10
|
||||||
global=true
|
global=true
|
||||||
|
|
||||||
# RWSplit
|
# RWSplit
|
||||||
|
Reference in New Issue
Block a user