mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Fix test_storage_mysql/test.py::test_settings_connection_wait_timeout
This commit is contained in:
parent
4dfad9ed9d
commit
9e92c26d53
@ -49,10 +49,6 @@ public:
|
||||
size_t max_block_size,
|
||||
size_t num_streams) override;
|
||||
|
||||
/// FIXME: enable parallelization later, currently it makes mysql intergation test flaky,
|
||||
/// see test_storage_mysql/test.py::test_settings_connection_wait_timeout
|
||||
bool parallelizeOutputAfterReading() const override { return false; }
|
||||
|
||||
SinkToStoragePtr write(const ASTPtr & query, const StorageMetadataPtr & /*metadata_snapshot*/, ContextPtr context) override;
|
||||
|
||||
struct Configuration
|
||||
|
@ -524,14 +524,15 @@ def test_settings_connection_wait_timeout(started_cluster):
|
||||
def worker():
|
||||
worker_started_event.set()
|
||||
node1.query(
|
||||
"SELECT sleepEachRow(1) FROM {} SETTINGS max_threads=1".format(table_name)
|
||||
"SELECT 1, sleepEachRow(1) FROM {} SETTINGS max_threads=1".format(table_name)
|
||||
)
|
||||
|
||||
worker_thread = threading.Thread(target=worker)
|
||||
worker_thread.start()
|
||||
|
||||
# ensure that first query started in worker_thread
|
||||
assert worker_started_event.wait(20)
|
||||
assert worker_started_event.wait(10)
|
||||
time.sleep(1)
|
||||
|
||||
started = time.time()
|
||||
with pytest.raises(
|
||||
@ -539,7 +540,7 @@ def test_settings_connection_wait_timeout(started_cluster):
|
||||
match=r"Exception: mysqlxx::Pool is full \(connection_wait_timeout is exceeded\)",
|
||||
):
|
||||
node1.query(
|
||||
"SELECT sleepEachRow(1) FROM {} settings max_threads=1".format(table_name)
|
||||
"SELECT 2, sleepEachRow(1) FROM {} SETTINGS max_threads=1".format(table_name)
|
||||
)
|
||||
ended = time.time()
|
||||
assert (ended - started) >= wait_timeout
|
||||
|
Loading…
Reference in New Issue
Block a user