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>
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>
* 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
* 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
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>
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)
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>