mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-22 15:42:02 +00:00
Merge pull request #68462 from ClickHouse/fix-test-02122_join_group_by_timeout
Fix test `02122_join_group_by_timeout`
This commit is contained in:
commit
05df12379a
@ -15,6 +15,7 @@ fi
|
||||
|
||||
# TCP CLIENT: As of today (02/12/21) uses PullingAsyncPipelineExecutor
|
||||
### Should be cancelled after 1 second and return a 159 exception (timeout)
|
||||
### However, in the test, the server can be overloaded, so we assert query duration in the interval of 1 to 60 seconds.
|
||||
query_id=$(random_str 12)
|
||||
$CLICKHOUSE_CLIENT --query_id "$query_id" --max_execution_time 1 -q "
|
||||
SELECT * FROM
|
||||
@ -33,7 +34,7 @@ $CLICKHOUSE_CLIENT --query_id "$query_id" --max_execution_time 1 -q "
|
||||
FORMAT Null
|
||||
" 2>&1 | grep -m1 -o "Code: 159"
|
||||
$CLICKHOUSE_CLIENT -q "system flush logs"
|
||||
${CLICKHOUSE_CURL} -q -sS "$CLICKHOUSE_URL" -d "select 'query_duration', round(query_duration_ms/1000) from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and query_id = '$query_id' and type != 'QueryStart'"
|
||||
${CLICKHOUSE_CURL} -q -sS "$CLICKHOUSE_URL" -d "select 'query_duration', round(query_duration_ms/1000) BETWEEN 1 AND 60 from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and query_id = '$query_id' and type != 'QueryStart'"
|
||||
|
||||
|
||||
### Should stop pulling data and return what has been generated already (return code 0)
|
||||
@ -52,7 +53,7 @@ $CLICKHOUSE_CLIENT --query_id "$query_id" -q "
|
||||
"
|
||||
echo $?
|
||||
$CLICKHOUSE_CLIENT -q "system flush logs"
|
||||
${CLICKHOUSE_CURL} -q -sS "$CLICKHOUSE_URL" -d "select 'query_duration', round(query_duration_ms/1000) from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and query_id = '$query_id' and type != 'QueryStart'"
|
||||
${CLICKHOUSE_CURL} -q -sS "$CLICKHOUSE_URL" -d "select 'query_duration', round(query_duration_ms/1000) BETWEEN 1 AND 60 from system.query_log where current_database = '$CLICKHOUSE_DATABASE' and query_id = '$query_id' and type != 'QueryStart'"
|
||||
|
||||
|
||||
# HTTP CLIENT: As of today (02/12/21) uses PullingPipelineExecutor
|
||||
|
Loading…
Reference in New Issue
Block a user