mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Added a test for ThreadPool #4572
This commit is contained in:
parent
c3a2e73f32
commit
f15762a96e
@ -0,0 +1,4 @@
|
||||
1
|
||||
1500
|
||||
0
|
||||
Ok.
|
13
dbms/tests/queries/0_stateless/00913_many_threads.sql
Normal file
13
dbms/tests/queries/0_stateless/00913_many_threads.sql
Normal file
@ -0,0 +1,13 @@
|
||||
-- This test creates many threads to test a case when ThreadPool will remove some threads from pool after job is done.
|
||||
SET max_block_size = 1, min_insert_block_size_rows = 0, min_insert_block_size_bytes = 0;
|
||||
|
||||
CREATE TEMPORARY TABLE t (x UInt64);
|
||||
INSERT INTO t SELECT * FROM system.numbers LIMIT 1500;
|
||||
|
||||
SELECT DISTINCT blockSize() FROM t;
|
||||
|
||||
SET max_threads = 1500;
|
||||
|
||||
SELECT count() FROM t;
|
||||
SELECT sum(sleep(0.1)) FROM t; -- All threads have time to be created.
|
||||
SELECT 'Ok.';
|
Loading…
Reference in New Issue
Block a user