Fail faster in mxs1929_filter_runtime
If the test fails, there's no point in continuing with the load generation as it only serves to slow things down. In few cases the test caused std::bad_alloc to be thrown which prematurely stopped the ctest run.
This commit is contained in:
parent
166e335e95
commit
a9a20bf16b
@ -126,12 +126,12 @@ void load(TestConnections& test)
|
||||
};
|
||||
|
||||
auto worker = [&](std::atomic<bool>& running) {
|
||||
while (running)
|
||||
while (running && test.global_result == 0)
|
||||
{
|
||||
Connection c = test.maxscales->rwsplit();
|
||||
c.connect();
|
||||
|
||||
while (running)
|
||||
while (running && test.global_result == 0)
|
||||
{
|
||||
test.expect(c.query("select 1"), "Query should succeed: %s", c.error());
|
||||
}
|
||||
@ -152,12 +152,12 @@ void filter_swap(TestConnections& test)
|
||||
};
|
||||
|
||||
auto worker = [&](std::atomic<bool>& running) {
|
||||
while (running)
|
||||
while (running && test.global_result == 0)
|
||||
{
|
||||
Connection c = test.maxscales->rwsplit();
|
||||
c.connect();
|
||||
|
||||
while (running)
|
||||
while (running && test.global_result == 0)
|
||||
{
|
||||
test.expect(c.check("select 1", "1"), "Query should not return 1 as a result");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user