Commit Graph

687 Commits

Author SHA1 Message Date
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
avogar
aadfc37dda Merge branch 'master' of github.com:ClickHouse/ClickHouse into better-stress-upgrade-checks 2024-03-15 20:27:16 +00:00
avogar
fa9d9ea3f7 Ignore DROP queries in stress test with 1/2 probability, use TRUNCATE instead of ignoring DROP in upgrade check for Memory/JOIN tables 2024-03-15 20:23:39 +00:00
Raúl Marín
cca96e05cf Bring clickhouse-test changes from private 2024-03-13 13:58:45 +01:00
Mikhail f. Shiryaev
e31078e204
Fix some issues detected by new pylint 2024-03-05 16:02:36 +01:00
Mikhail f. Shiryaev
ec72800d78
Merge pull request #60383 from nickitat/upd_liburing
Enable testing with `io_uring` back
2024-03-05 15:26:35 +01:00
Michael Kolupaev
42437a2ae1 Userspace page cache (#53770)
* Userspace page cache

* Maybe it'll build this time, who knows.

* 'auto' went out of fashion, I guess

* Documentation, tsan workaround, metric 'UnreclaimableRss', disable page cache in the test that uses DatabaseOrdinary

* Moved CachedInMemoryReadBufferFromFile to object store level, changed settings, addressed other comments.

* Fix

* Another fix

* Fix restricted seek, fix ppc64le build

* Don't allow page cache with file cache

* Adjust tests a little

* Fix clang-tidy

* Conflicts

* Comments

* Maybe unbroke AsynchronousBoundedReadBuffer

* SettingsChangesHistory.h

* Fix warning in test
2024-02-29 12:28:32 +00:00
Alexander Tokmakov
15e1191f74
Revert "Userspace page cache (#53770)"
This reverts commit 7b55c61551.
2024-02-29 13:20:17 +01:00
Michael Kolupaev
7b55c61551
Userspace page cache (#53770)
* Userspace page cache

* Maybe it'll build this time, who knows.

* 'auto' went out of fashion, I guess

* Documentation, tsan workaround, metric 'UnreclaimableRss', disable page cache in the test that uses DatabaseOrdinary

* Moved CachedInMemoryReadBufferFromFile to object store level, changed settings, addressed other comments.

* Fix

* Another fix

* Fix restricted seek, fix ppc64le build

* Don't allow page cache with file cache

* Adjust tests a little

* Fix clang-tidy

* Conflicts

* Comments

* Maybe unbroke AsynchronousBoundedReadBuffer

* SettingsChangesHistory.h

* Fix warning in test
2024-02-29 11:27:32 +00:00
Nikita Taranov
3c5d6c4df0 Revert "Merge pull request #60373 from azat/tests/detect-io_uring"
This reverts commit 648e6ec5a6, reversing
changes made to 273b4835a4.
2024-02-25 15:00:26 +01:00
Azat Khuzhin
554d993d8b clickhouse-test: fix style check (unused import platform)
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-24 19:37:13 +01:00
Azat Khuzhin
35e948a20a Detect io_uring in tests
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2024-02-24 19:36:58 +01:00
János Benjamin Antal
b094ab9763 Add comment 2024-02-12 15:27:20 +00:00
Alexey Milovidov
cfe60586c0 Reset coverage after each test 2024-01-20 21:45:11 +01:00
Alexey Milovidov
735708e9bb Merge branch 'master' into enable-coverage-for-debug-build 2024-01-20 21:40:53 +01:00
vdimir
97a38855c1
Merge pull request #57870 from ClickHouse/vdimir/test_show_whitespaces_in_diff
Add option `--show-whitespaces-in-diff` to clickhouse-test
2024-01-19 10:42:00 +01:00
Alexey Milovidov
6b8d53a9fa Remove obsolete comment 2024-01-16 11:07:30 +01:00
Alexey Milovidov
21082be9a6 Better test 2024-01-16 10:41:13 +01:00
Alexey Milovidov
5cda358e62 Obey Python's quirky formatter 2024-01-15 06:26:04 +01:00
Alexey Milovidov
e49cfbef08 Coverage for non-server tools 2024-01-15 05:40:03 +01:00
Alexey Milovidov
fe952fb64c Rename to system.coverage_log to simplify export 2024-01-15 00:38:42 +01:00
Alexey Milovidov
3e09feda33 More functions 2024-01-15 00:36:07 +01:00
Alexey Milovidov
f7abeff085 Slightly better reporting 2024-01-15 00:25:07 +01:00
Alexey Milovidov
9141e1693f Calculate cumulative coverage by default. 2024-01-15 00:24:17 +01:00
Alexey Milovidov
3bd2c7e384 Report coverage if available 2024-01-14 22:06:25 +01:00
Michael Kolupaev
edd120e8be Make it experimental 2023-12-28 17:56:05 +00:00
Michael Kolupaev
0fc7535eba Fixes 2023-12-28 17:56:05 +00:00
Alexander Tokmakov
38fe70c68a
Revert "Refreshable materialized views (takeover)" 2023-12-28 13:12:20 +01:00
Michael Kolupaev
18cc5d1b76 Make it experimental 2023-12-27 20:24:55 +00:00
Michael Kolupaev
802961f0a2 Fixes 2023-12-27 20:24:55 +00:00
robot-clickhouse
d3404db055 Automatic style fix 2023-12-27 14:40:20 +00:00
vdimir
0df796f617
clickhouse-test show-whitespaces-in-diff shows $ on in end of line with spaces 2023-12-27 14:31:07 +00:00
vdimir
4d7edb4321
Add option --show-whitespaces-in-diff to clickhouse-test 2023-12-27 14:04:40 +00:00
Azat Khuzhin
c5dbde8407 Replace timeout --foreground with one workaround
The problem with --foreground option is that it send the signal only to
the process that had been spawned by timeout(1), while it can create
lots of children, and when you killing parent you are closing pipes and
childrens will get EPIPE, like in [1].

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/0/069f8bbb2f48541cc736903e1da5459fa2c27da0/stateless_tests__debug__%5B2_5%5D.html

Another problem is that now child process will finish correctly, which
may also print some errors like QUERY_WAS_CANCELLED (see [2]).

  [2]: https://s3.amazonaws.com/clickhouse-test-reports/0/ef66714bf20042ba9cb5d59b7839befe26110b93/stateless_tests__release__analyzer_.html

In general this is not required actually, since all timeout invocations
uses timeout value less then the default test limit (10min). But it may
leave some processes in case of overriding this limit, i.e.
`clickhouse-test --timeout 1`

So to workaround this at least somehow, let's send SIGTERM and only
after some timeout (here I use 0.1), SIGKILL. This will give at least
some ability to terminate all childrens that had been spawned by
timeout(1).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-24 13:23:09 +01:00
Azat Khuzhin
1fdee81ad5 Fix leftover processes/hangs in tests
One of such cases is 02479_race_condition_between_insert_and_droppin_mv
[1], yes it can be fixed (by using fixed number of iterations, or with
some bash trickery), but it is better to fix them completelly,
eventually such tests will be submitted and pass review anyway.

By allocating process group for each test we can kill all the processes
in this process group, and this what this patch does.

This will also fix some test hangs (like in [1]) as well as some
possible issues in stress tests.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/0/e2c1230b00386c4d0096a245396ab3be7ce60950/stateless_tests__release__analyzer_/run.log

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
(cherry picked from commit 72fa58e192)
2023-12-24 09:43:58 +01:00
Alexey Milovidov
71c5ae548f
Revert "Fix leftover processes/hangs in tests" 2023-12-24 07:57:43 +03:00
Azat Khuzhin
72fa58e192 Fix leftover processes/hangs in tests
One of such cases is 02479_race_condition_between_insert_and_droppin_mv
[1], yes it can be fixed (by using fixed number of iterations, or with
some bash trickery), but it is better to fix them completelly,
eventually such tests will be submitted and pass review anyway.

By allocating process group for each test we can kill all the processes
in this process group, and this what this patch does.

This will also fix some test hangs (like in [1]) as well as some
possible issues in stress tests.

  [1]: https://s3.amazonaws.com/clickhouse-test-reports/0/e2c1230b00386c4d0096a245396ab3be7ce60950/stateless_tests__release__analyzer_/run.log

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-12-23 16:40:33 +01:00
Alexander Tokmakov
8f9dff8c88
Update clickhouse-test 2023-12-22 19:54:15 +01:00
Sema Checherinda
291567a5b2
Merge pull request #58007 from ClickHouse/chesema-stateless-run-timeout
more messages in ci
2023-12-20 13:50:12 +01:00
Raúl Marín
98c9f830d6 Revert "Merge pull request #55710 from guoxiaolongzte/clickhouse-test-add-prinln-nowTime"
This reverts commit efefad9e52, reversing
changes made to 8f7852f82d.
2023-12-20 10:16:47 +01:00
Anton Popov
4859a74b16
Correct values for randomization 2023-12-20 02:42:24 +01:00
Yakov Olkhovskiy
efefad9e52
Merge pull request #55710 from guoxiaolongzte/clickhouse-test-add-prinln-nowTime
clickhouse-test print  Case SN, Current Time and Case Name in one test case
2023-12-19 18:58:19 -05:00
Sema Checherinda
b4fec61814 fix style and black 2023-12-19 13:43:35 +01:00
Sema Checherinda
939d602c3c fix typo 2023-12-18 19:30:05 +01:00
Sema Checherinda
140f6dafd8 hung_check check with lighter queries 2023-12-18 19:16:50 +01:00
Anton Popov
32c4b74067 Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-14 14:26:58 +00:00
Raúl Marín
a45c8bd7f1
Merge pull request #57315 from Algunenano/randomize_optimizations
Randomize disabled optimizations in CI
2023-12-13 10:42:11 +01:00
Anton Popov
b5c2623b3c Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-11 14:14:25 +00:00
Alexey Milovidov
00aca9a3d4
Merge pull request #57634 from ClickHouse/fix-logs-and-exceptions-messages-formatting-4
Fix "logs and exception messages formatting", part 4
2023-12-08 22:02:02 +01:00
Anton Popov
e5f849bdae fix some tests 2023-12-08 15:30:12 +00:00
Alexey Milovidov
5dcdbf499b Fix "logs and exception messages formatting", part 4 2023-12-07 22:04:48 +01:00
Alexey Milovidov
81e0d081a2 Fix "logs and exception messages formatting", part 2 2023-12-07 21:48:43 +01:00
Alexey Milovidov
6ed8ea96af Fix "logs and exception messages formatting", part 2 2023-12-07 21:43:47 +01:00
Alexey Milovidov
ba1404136c Fix "logs and exception messages formatting", part 2 2023-12-07 21:42:57 +01:00
Anton Popov
2dbc2853b8 Merge remote-tracking branch 'upstream/master' into HEAD 2023-12-07 13:52:54 +00:00
Raúl Marín
89b9373398 More random after tests are successful 2023-12-05 18:17:47 +00:00
Raúl Marín
3eb68a6740 optimize_using_constraints is broken 2023-12-04 10:08:46 +00:00
Raúl Marín
3867adbb10 Adapt tests and avoid using optimize_syntax_fuse_functions at all 2023-11-30 19:19:26 +01:00
Raúl Marín
64bd77fe9c Do not randomize optimize_functions_to_subcolumns 2023-11-30 14:05:19 +01:00
Raúl Marín
025fcd3aa4 Enable the settings to do a full run with them enabled 2023-11-28 18:22:49 +01:00
Raúl Marín
ade60b5b45 Randomize disabled optimizations in CI 2023-11-28 14:12:26 +01:00
Alexey Milovidov
f8ebe5134d
Merge pull request #55836 from azat/dist/limit-by-fix
RFC: Fix "Cannot find column X in source stream" for Distributed queries with LIMIT BY
2023-11-26 04:03:41 +01:00
Kseniia Sumarokova
d384762123
Merge branch 'master' into fs-cache-improvement 2023-11-21 11:24:52 +01:00
Kseniia Sumarokova
9523bd0ad8
Fix config 2023-11-17 12:17:01 +01:00
robot-clickhouse
501d210647 Automatic style fix 2023-11-04 21:04:39 +00:00
Alexey Milovidov
f5e439d9df Add an option to enable or disable coverage collection in clickhouse-test 2023-11-04 21:53:05 +01:00
Alexey Milovidov
ea6cb1ad0c Maybe better 2023-10-30 01:04:50 +01:00
Alexey Milovidov
8e6a7fdff0 Fix f-string 2023-10-29 23:43:36 +01:00
Alexey Milovidov
4288cb3b78 Make clickhouse-test to calculate coverage on a per-test basis 2023-10-29 17:43:01 +01:00
Alexey Milovidov
8e0f487387 Initial support in clickhouse-test 2023-10-29 17:21:45 +01:00
kssenii
b13adbbeab Fix style check 2023-10-20 11:48:27 +02:00
Azat Khuzhin
7a096904ed clickhouse-test: export product function for jinja2
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-10-19 15:41:03 +02:00
kssenii
89272e0925 Fix upgrade check, randomize more settings 2023-10-19 11:23:56 +02:00
guoxiaolong
edcda1ed6d fix checkstyle 2023-10-18 10:12:42 +08:00
guoxiaolong
c552a91260 clickhouse-test case No 2023-10-17 19:27:42 +08:00
guoxiaolong
d2360302cf clickhouse-test print nowTime in one test case. Because the end time of all test cases is long, adding a specific test case time to print can observe the specific execution status and progress 2023-10-17 15:33:21 +08:00
Anton Popov
624782bd8f Merge remote-tracking branch 'upstream/master' into HEAD 2023-09-18 23:13:20 +00:00
Azat Khuzhin
f2ef2ec012 Fix clickhouse-test --no-drop-if-fail on reference mismatch
Previusly it worked only for the case when the clickhouse-client/script
exited with non 0, because the check was done before checking the
reference file.

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-09-04 16:55:32 +02:00
Anton Popov
579ec699bf Merge remote-tracking branch 'upstream/master' into HEAD 2023-08-31 12:59:59 +00:00
Michael Kolupaev
ad71bf5f7d Fix flakiness of 00514_interval_operators 2023-08-28 23:35:47 +00:00
Dmitry Novik
16cbda14f8
Merge pull request #53700 from ClickHouse/fix-clickhouse-test-set
Fix running clickhouse-test with python 3.8
2023-08-22 18:07:21 +02:00