Commit Graph

767 Commits

Author SHA1 Message Date
Azat Khuzhin
72bd43a309 tests: do not capture client stacktraces in stress tests
They are too uncontrollable, and likely will leave some clients [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/67737/9658be5eea8351655dd3ea77b8c1d4717bac7999/stress_test__ubsan_.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:42:19 +02:00
Azat Khuzhin
8ce23ff113 tests: increase delay co capture client stacktraces for sanitizers build
5 seconds is too small and not enough to print even few frames.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/67737/9658be5eea8351655dd3ea77b8c1d4717bac7999/stress_test__ubsan_.html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
ef7d12db66 tests: change the process group earlier to avoid killing self
Previously it was possible to have original pgid from the spawned
threads, that could lead to killing the caller script and in case of CI
it could be init process [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/67737/e68c9c8d16f37f6c25739076c9b071ed97952269/stress_test__asan_/stress_test_run_21.txt

Repro:

    $ echo "SELECT '1" > tests/queries/0_stateless/00001_select_1.sql # break the test
    $ cat /tmp/test.sh
    ./tests/clickhouse-test 0001_select --test-runs 3 --max-failures-chain 1 --no-random-settings --no-random-merge-tree-settings

Before this change:

    $ /tmp/test.sh
    Using queries from '/src/ch/worktrees/clickhouse-upstream/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 24.8.1.1 @ bef896ce143ea4e0464c9829de6277ba06cc1a53 mt/rename-without-lock-v2
    Running 3 stateless tests (MainProcess).
    00001_select_1:                                                         [ FAIL ]
    Reason: return code:  62
    Code: 62. DB::Exception: Syntax error: failed at position 8 (''1;
    '): '1;
    . Single quoted string is not closed: ''1;
    '. (SYNTAX_ERROR)

    , result:

    stdout:

    Database: test_hz2zwymr
    Child processes of 13041:
    13042 python3 ./tests/clickhouse-test 0001_select --test-runs 3 --max-failures-chain 1 --no-random-settings --no-random-merge-tree-settings
    Killing process group 13040
    Processes in process group 13040:
    13040 -bash
    13042 python3 ./tests/clickhouse-test 0001_select --test-runs 3 --max-failures-chain 1 --no-random-settings --no-random-merge-tree-settings

    [2]+  Stopped                 /tmp/test.sh
    [1]$ Process group 13040 should be killed
    Max failures chain

    [2]+  Killed                  /tmp/test.sh

After:

    $ /tmp/test.sh
    Using queries from '/src/ch/worktrees/clickhouse-upstream/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 24.8.1.1 @ bef896ce143ea4e0464c9829de6277ba06cc1a53 mt/rename-without-lock-v2
    Running 3 stateless tests (MainProcess).
    00001_select_1:                                                         [ FAIL ]
    Reason: return code:  62
    Code: 62. DB::Exception: Syntax error: failed at position 8 (''1;
    '): '1;
    . Single quoted string is not closed: ''1;
    '. (SYNTAX_ERROR)

    , result:

    stdout:

    Database: test_urz6rk5z
    Child processes of 9782:
    9785 python3 ./tests/clickhouse-test 0001_select --test-runs 3 --max-failures-chain 1 --no-random-settings --no-random-merge-tree-settings
    Max failures chain

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
b76fb165d1 tests: fix pylint issue in clickhouse_execute_http()
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
a6ccf19869 tests: capture stderr/stdout/debuglog after terminating test
It was simply wrong before, but now, with capturing stacktrace that can
take sometime it is a must.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
a478ad24a9 tests: try to catch stacktraces from client in case of test timeouts
This is to catch issues like [1].

  [1]: https://github.com/ClickHouse/ClickHouse/issues/67736

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
f9dcce6da3 tests: omit python stacktace in case of signals/server died
It is simply useless and only create output that only distracts.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Azat Khuzhin
ea1575f60a tests: avoid leaving processes leftovers
Previously processes cleanup on i.e. SIGINT simply did not work, because
the launcher kills only processes in process group, while tests are
launched with start_new_session=True for Popen(), which creates own
process group.

This is needed for killing process group in case of test timeout.

So instead, look at the parent pid, and kill the child process groups.

Also add some logging to make it more explicit which processes will be
killed.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-06 16:39:16 +02:00
Kruglov Pavel
56415028d6
Fix pylint 2024-08-06 15:01:10 +02:00
avogar
71c06b40cb Avoid regexp 2024-08-06 09:07:21 +00:00
avogar
bb33dca384 Fix unrelated changes 2024-08-06 08:49:08 +00:00
avogar
5226792b1d Fix bad merge with master 2024-08-06 08:48:06 +00:00
avogar
74a2976810 Fix pylint 2024-08-06 08:13:03 +00:00
avogar
18a7a82458 Better formatting 2024-08-05 21:18:37 +00:00
avogar
d3dc174533 Remove log 2024-08-05 21:15:11 +00:00
avogar
695cbe9f85 Merge branch 'master' of github.com:ClickHouse/ClickHouse into limits-for-random-settings 2024-08-05 21:12:33 +00:00
avogar
1b251fe088 Allow to specify min and max for random settings in the test 2024-08-05 21:10:31 +00:00
robot-clickhouse
7adeaf9c28 Automatic style fix 2024-08-04 22:35:16 +00:00
Alexey Milovidov
538761b43d Fix flaky check 2024-08-05 00:02:32 +02:00
Alexey Milovidov
a75c4b9f9f Introduce no-flaky-check tag 2024-08-04 18:07:40 +02:00
Kseniia Sumarokova
881ac7208e
Merge pull request #67361 from ClickHouse/add-no-distributed-cache-tag
Add no-distributed-cache tag in tests
2024-08-04 12:36:31 +00:00
Azat Khuzhin
a197502341 Fix test retries
Should fix issues like:
- 02494_zero_copy_projection_cancel_fetch - https://s3.amazonaws.com/clickhouse-test-reports/67719/40cd5467c18d65a6624d273ac1a8fd9cc9257d8c/stateless_tests__tsan__s3_storage__[4_4].html

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-08-03 23:11:20 +02:00
Igor Nikonov
cf27f2665e Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-29 20:00:55 +00:00
kssenii
161e794618 Add no-distributed-cache tag 2024-07-29 14:03:22 +02:00
Alexey Milovidov
22211e30aa
Revert "Enable compile_expressions by default." 2024-07-28 13:42:45 +02:00
Alexey Milovidov
c2dae64df3 Challenge how optimistic was Maksim Kita 2024-07-27 04:36:48 +02:00
Anton Popov
3c6c9303c3 disable setting optimize_functions_to_subcolumns 2024-07-24 13:14:43 +00:00
Igor Nikonov
4753f4cb33 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-20 20:54:11 +00:00
alesapin
6eec3c2c99
Merge pull request #66776 from ClickHouse/disable_harmful_setting_from_randomizaiton
Turn off randomization of harmful setting
2024-07-20 09:43:47 +00:00
Nikita Fomichev
14a0c7e300 Stateless tests: fix stylecheck 2024-07-19 21:13:51 +02:00
Nikita Fomichev
7fd779cc6f Stateless tests: split parallel tests more evenly 2024-07-19 20:48:19 +02:00
Alexander Sapin
7d379388d2 Turn off randomization of harmful setting 2024-07-19 17:12:34 +02:00
Igor Nikonov
75f7816c46 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-19 08:24:54 +00:00
Nikita Fomichev
7c1ed1b445 Stateless tests: check parallelization 2024-07-18 21:50:21 +02:00
Igor Nikonov
7fba824ed2 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-17 11:45:34 +00:00
Alexey Milovidov
2d33b7703a Merge branch 'master' into signal_handlers_in_client 2024-07-17 03:33:26 +02:00
Raúl Marín
de2e789c06 Change env variable to run tests with SMT 2024-07-15 19:44:30 +02:00
Igor Nikonov
c494096d33 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-14 16:39:06 +00:00
Alexey Milovidov
ce37be3ab1
Merge branch 'master' into signal_handlers_in_client 2024-07-14 00:54:30 +02:00
Max K
578d22ae94 style
Automatic style fix

Automatic style fix
2024-07-13 16:23:46 +02:00
Nikita Fomichev
8295a8e9b8 Stateless tests: fix flaky tests 4 2024-07-13 00:39:53 +02:00
Nikita Fomichev
cc2cce9717 Stateless tests: fix flaky tests 3 2024-07-13 00:34:54 +02:00
Igor Nikonov
f42fe31396 Merge remote-tracking branch 'origin/master' into pr-local-plan 2024-07-12 21:21:04 +00:00
Alexander Tokmakov
ea64527ea1 suppress broken test 2024-07-12 19:18:16 +02:00
Igor Nikonov
04c3661b0b Randomize parallel_replicas_local_plan 2024-07-12 13:42:25 +00:00
Alexander Tokmakov
edb9406f36 Merge branch 'master' into signal_handlers_in_client 2024-07-12 14:30:42 +02:00
Nikita Fomichev
5f8358942c Stateless tests: push CI 2024-07-12 03:06:07 +02:00
Nikita Fomichev
08b6dd604a Stateless tests: deal with hang-ups more roughly 2024-07-12 03:04:43 +02:00
Nikita Fomichev
6f3ae4a6de Fix path in test 2024-07-10 23:57:23 +02:00
Nikita Fomichev
e6b3368dc1 debug tests hung on gdb error 9 2024-07-10 17:09:50 +02:00
Nikita Fomichev
83cfe164bd debug tests hung on gdb error 7 2024-07-10 15:55:30 +02:00
Nikita Fomichev
ba176a9c4a debug tests hung on gdb error 6 2024-07-10 14:51:27 +02:00
Nikita Fomichev
f96d40d828 debug tests hung on gdb error 5 2024-07-10 13:35:19 +02:00
Nikita Fomichev
ede43721b4 debug tests hung on gdb error 4 2024-07-10 13:30:06 +02:00
Nikita Fomichev
ef08055db9 debug tests hung on gdb error 2 2024-07-10 12:47:32 +02:00
Nikita Fomichev
17d5ec28d4 debug tests hung on gdb error 2024-07-10 12:08:33 +02:00
Alexander Tokmakov
27738747e0 save fatal logs to file 2024-07-10 00:28:26 +02:00
Nikita Fomichev
eeb3561c37 Stateless tests: run sequential tests in parallel to other tests 2024-07-09 19:41:06 +02:00
Nikita Fomichev
5f643b9ed9
Merge pull request #65979 from ClickHouse/base64encode-tests
Add tests for `base64URLEncode` and `base64URLDecode`. Add analyzer tests
2024-07-07 18:43:02 +00:00
Nikita Fomichev
be8945f2a0 Merge remote-tracking branch 'origin/master' into fix-missing-tests-reports 2024-07-07 10:04:58 +02:00
Nikita Fomichev
db462a7920 Merge remote-tracking branch 'origin/master' into base64encode-tests 2024-07-07 10:04:13 +02:00
Nikita Fomichev
34697c0bfa Tests: increase timeout for flaky check 2024-07-04 15:55:03 +02:00
Nikita Fomichev
af845234a2 Review fixes 2024-07-03 17:53:05 +02:00
Nikita Fomichev
b88be7260f Tests: Eliminating the global tests queue to prevent clickhouse-test from hanging when a server dies 2024-07-03 13:43:30 +02:00
alesapin
452201caf9 Black 2024-07-02 14:21:39 +02:00
alesapin
a2626037bc Improve object storage tags in tests 2024-07-02 14:15:59 +02:00
Nikita Fomichev
54bc5d12ef Add randomization of new settings in clickhouse-test
prefer_external_sort_block_bytes
cross_join_min_rows_to_compress
cross_join_min_bytes_to_compress
max_parsing_threads
min_external_table_block_size_bytes
2024-06-05 22:57:10 +02:00
Nikita Mikhaylov
0294e677ff
Update tests/clickhouse-test
Co-authored-by: Konstantin Bogdanov <thevar1able@users.noreply.github.com>
2024-05-30 19:52:59 +02:00
Nikita Mikhaylov
2e913444d3 Shuffle tests for parallel execution 2024-05-30 17:45:27 +00:00
vdimir
6d5805d260
Do not run tests with 'no-s3-storage-with-slow-build' with ASan 2024-05-24 14:54:39 +00:00
Alex Katsman
5dbc1f347e Fix logs test for binary data by converting it to a valid UTF8 string. 2024-05-15 19:37:42 +00:00
Maxim Alexeev
9c2e1bfce6 fixed review 2024-05-13 19:39:45 +03:00
Ali
65934b5651
Update clickhouse-test
Fixed a typo
2024-05-11 23:16:42 +03:30
Alexander Tokmakov
a08a07723b
Update clickhouse-test 2024-05-08 16:26:03 +02:00
Raúl Marín
7e06b01e15
Merge pull request #63130 from Algunenano/coverage_test
Try to fix coverage tests
2024-05-02 09:34:57 +00:00
Raúl Marín
e79860aa0a Fix linter 2024-04-30 22:24:46 +02:00
Raúl Marín
9c3775b7c6 More fixes 2024-04-30 14:32:32 +02:00
Alexey Milovidov
a86f2aab2f
Merge pull request #63073 from azat/tests/fix-logs-stats
Fix "invalid escape sequence" in clickhouse-test
2024-04-30 01:27:32 +02:00
Raúl Marín
f7ad885725 Try to fix coverage tests 2024-04-29 21:38:45 +02:00
Azat Khuzhin
881e45b680 Fix "invalid escape sequence" in clickhouse-test
python error:

    /src/ch/clickhouse/.cmake/../tests/clickhouse-test:2570: SyntaxWarning: invalid escape sequence '\/'

And also remove unnecessary escaping of `/`.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-27 17:01:32 +02:00
Alexey Milovidov
f6d443c927
Merge pull request #62041 from azat/clickhouse-test-no-reference-fix
Fix clickhouse-test in case of missing .reference file
2024-04-27 14:55:54 +00:00
Azat Khuzhin
d40ad207ff Fix --client-option for $CLICKHOUSE_CLIENT in .sh tests
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-04-17 11:56:45 +03:00
Alexander Tokmakov
d8e97b51bf Merge branch 'master' into cannot_allocate_thread 2024-04-10 21:21:42 +02:00
Alexander Tokmakov
b6aff78bf5 fix 2024-04-08 16:13:46 +02:00
Alexander Tokmakov
5db9fbed52 cancel tasks on exception 2024-04-04 22:32:57 +02:00
robot-clickhouse
ea16070117 Automatic style fix 2024-04-03 19:17:46 +00:00
Alexander Tokmakov
c53b20a770 fix 2024-04-03 20:57:12 +02:00
avogar
d87d5a9197 Merge branch 'master' of github.com:ClickHouse/ClickHouse into better-stress-upgrade-checks 2024-04-03 12:07:22 +00:00
Raúl Marín
7627f48bbe
Merge pull request #62139 from arthurpassos/fix_ci_too_long_run_typo
Fix incorrect CI error message
2024-04-02 13:26:17 +02:00
Arthur Passos
2a5e9ea713 fix black 2024-04-01 13:07:52 -03:00
Arthur Passos
5e9436611a fix incorrect ci err message 2024-04-01 10:21:23 -03:00
Azat Khuzhin
61b7c942ac Fix clickhouse-test in case of missing .reference file
Before it throws internal python error:

    $ ../tests/clickhouse-test 03033
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 24.3.1.1 @ 3fa6d23730 master

    Running 1 stateless tests (MainProcess).

    03033_dist:                                                             [ UNKNOWN ] - Test internal error:
    TypeError
    expected str, bytes or os.PathLike object, not NoneType
      File "/src/ch/clickhouse/.cmake/../tests/clickhouse-test", line 1644, in run
        if not is_valid_utf_8(self.case_file) or not is_valid_utf_8(
                                                     ^^^^^^^^^^^^^^^

      File "/src/ch/clickhouse/.cmake/../tests/clickhouse-test", line 237, in is_valid_utf_8
        with open(fname, "rb") as f:
             ^^^^^^^^^^^^^^^^^

    0 tests passed. 0 tests skipped. 0.01 s elapsed (MainProcess).
    Won't run stateful tests because test data wasn't loaded.
    All tests have finished.

Now:

    $ ../tests/clickhouse-test 03033
    Using queries from '/src/ch/clickhouse/tests/queries' directory
    Connecting to ClickHouse server... OK
    Connected to server 24.3.1.1 @ 3fa6d23730 master

    Running 1 stateless tests (MainProcess).

    03033_dist:                                                             [ UNKNOWN ] - no reference file

    0 tests passed. 0 tests skipped. 0.11 s elapsed (MainProcess).
    Won't run stateful tests because test data wasn't loaded.
    All tests have finished.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-03-28 14:29:18 +01:00
Nikolay Degterinsky
72f3871bd3
Fix clickhouse-test 2024-03-28 01:58:17 +01:00
Kruglov Pavel
de1229ba60
Merge branch 'master' into better-stress-upgrade-checks 2024-03-25 19:18:35 +01:00
Alexey Milovidov
8b6e2d7226 Do not print garbage in clickhouse-test 2024-03-23 02:50:40 +01:00
Maksim Kita
4dc985aa2f Fixed style check 2024-03-21 12:41:15 +03:00
Maksim Kita
b8c53d7cf3 Fixed tests 2024-03-21 12:41:15 +03:00
vdimir
3f46a5d93d
Fix clickhouse-test client option and CLICKHOUSE_URL_PARAMS interference 2024-03-19 13:01:25 +00:00
avogar
31d5049f80 Move logic of ignoring drop queries to server 2024-03-18 16:26:05 +00:00
avogar
eada7e8d29 Fix server version 2024-03-18 13:18:58 +00:00