Prevent hangs in mxs173_throttle_filter
The test now sets a two minute timeout for all larger operations. This prevents excessive waiting when the test is executed. Removed the row count output to stdout to prevent excessive logging when the terminal contents are written to a file. Also renamed the file to match the test case name. This should remove the need to find the source file to test name mapping from the CMakeLists.txt.
This commit is contained in:
parent
1c9e03ec9c
commit
61cc709519
@ -993,7 +993,7 @@ add_test_executable(mxs1628_bad_handshake.cpp mxs1628_bad_handshake replication
|
||||
add_test_executable(mxs1836_show_eventTimes.cpp mxs1836_show_eventTimes mxs1836_show_eventTimes LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-173 throttling filter
|
||||
add_test_executable(mxs173.cpp mxs173_throttle_filter mxs173_throttle_filter LABELS REPL_BACKEND)
|
||||
add_test_executable(mxs173_throttle_filter.cpp mxs173_throttle_filter mxs173_throttle_filter LABELS REPL_BACKEND)
|
||||
|
||||
# MXS-1889: A single remaining master is valid for readconnroute configured with 'router_options=slave'
|
||||
# https://jira.mariadb.org/browse/MXS-1889
|
||||
|
@ -76,7 +76,6 @@ ReadSpeed read_rows(MYSQL* conn, int num_rows, int max_qps, bool expect_error)
|
||||
if (expect_error)
|
||||
{
|
||||
base::Duration dur = sw.lap();
|
||||
std::cout << "\r \r";
|
||||
return {true, dur, i / std::chrono::duration<float>(dur).count()};
|
||||
}
|
||||
else
|
||||
@ -113,16 +112,9 @@ ReadSpeed read_rows(MYSQL* conn, int num_rows, int max_qps, bool expect_error)
|
||||
{
|
||||
THROW(Whoopsy, "Extra row index = " << index << " name = " << row[0] << " in resultset.");
|
||||
}
|
||||
|
||||
std::cout << "\r" << num_rows - i - 1 << ' ';
|
||||
if (i % 117 == 0)
|
||||
{
|
||||
std::cout.flush();
|
||||
}
|
||||
}
|
||||
|
||||
base::Duration dur = sw.lap();
|
||||
std::cout << "\r \r";
|
||||
return ReadSpeed {false, dur, num_rows / std::chrono::duration<float>(dur).count()};
|
||||
}
|
||||
|
||||
@ -200,24 +192,29 @@ int main(int argc, char *argv[])
|
||||
|
||||
try
|
||||
{
|
||||
test.print_env();
|
||||
test.maxscales->connect_maxscale(0);
|
||||
|
||||
std::cout << "Create table\n";
|
||||
test.set_timeout(120);
|
||||
create_table(test.maxscales->conn_master[0]);
|
||||
|
||||
std::cout << "Insert rows\n";
|
||||
test.set_timeout(120);
|
||||
insert_rows(test.maxscales->conn_master[0]);
|
||||
|
||||
test.set_timeout(120);
|
||||
gauge_raw_speed(test);
|
||||
|
||||
test.stop_timeout();
|
||||
test.repl->sync_slaves();
|
||||
|
||||
test.set_timeout(120);
|
||||
verify_throttling_performace(test);
|
||||
|
||||
test.maxscales->close_maxscale_connections(0);
|
||||
test.maxscales->connect_maxscale(0);
|
||||
|
||||
test.set_timeout(120);
|
||||
verify_throttling_disconnect(test);
|
||||
|
||||
std::cout << "\n\n";
|
Loading…
x
Reference in New Issue
Block a user