Merge pull request #54321 from azat/tests/01051_system_stack_trace

Increase timeout for system.stack_trace in 01051_system_stack_trace
This commit is contained in:
Alexey Milovidov 2023-09-07 01:54:53 +03:00 committed by GitHub
commit dc127f2572
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 5 deletions

View File

@ -1,5 +1,5 @@
-- { echo }
SELECT count() > 0 FROM system.stack_trace WHERE query_id != '';
SELECT count() > 0 FROM system.stack_trace WHERE query_id != '' AND thread_name = 'TCPHandler';
1
-- opimization for not reading /proc/self/task/{}/comm and avoid sending signal
SELECT countIf(thread_id > 0) > 0 FROM system.stack_trace;
@ -8,7 +8,7 @@ SELECT countIf(thread_id > 0) > 0 FROM system.stack_trace;
SELECT count(trace) > 0 FROM system.stack_trace WHERE length(trace) > 0 LIMIT 1;
1
-- optimization for query_id
SELECT length(query_id) > 0 FROM system.stack_trace WHERE query_id != '' LIMIT 1;
SELECT length(query_id) > 0 FROM system.stack_trace WHERE query_id != '' AND thread_name = 'TCPHandler' LIMIT 1;
1
-- optimization for thread_name
SELECT length(thread_name) > 0 FROM system.stack_trace WHERE thread_name != '' LIMIT 1;

View File

@ -1,13 +1,19 @@
SET storage_system_stack_trace_pipe_read_timeout_ms = 1000;
-- Tags: no-parallel
-- Tag no-parallel: to decrease failure probability of collecting stack traces
-- NOTE: It is OK to have bigger timeout here since:
-- a) this test is marked as no-parallel
-- b) there is a filter by thread_name, so it will send signals only to the threads with the name TCPHandler
SET storage_system_stack_trace_pipe_read_timeout_ms = 5000;
-- { echo }
SELECT count() > 0 FROM system.stack_trace WHERE query_id != '';
SELECT count() > 0 FROM system.stack_trace WHERE query_id != '' AND thread_name = 'TCPHandler';
-- opimization for not reading /proc/self/task/{}/comm and avoid sending signal
SELECT countIf(thread_id > 0) > 0 FROM system.stack_trace;
-- optimization for trace
SELECT count(trace) > 0 FROM system.stack_trace WHERE length(trace) > 0 LIMIT 1;
-- optimization for query_id
SELECT length(query_id) > 0 FROM system.stack_trace WHERE query_id != '' LIMIT 1;
SELECT length(query_id) > 0 FROM system.stack_trace WHERE query_id != '' AND thread_name = 'TCPHandler' LIMIT 1;
-- optimization for thread_name
SELECT length(thread_name) > 0 FROM system.stack_trace WHERE thread_name != '' LIMIT 1;
-- enough rows (optimizations works "correctly")