Commit Graph

297 Commits

Author SHA1 Message Date
Nicolae Vartolomei
115edd3e42 Fix hang and incorrect exit code returned from clickhouse-test
Variables aren't shared when using multiprocessing, use shared memory
instead
https://docs.python.org/3/library/multiprocessing.html#shared-ctypes-objects.

There appears to be a deadlock when multiple threads try to send
sigterm signal at the same time. Avoid it by making sure sigterm is sent
only once for the process group.
2021-06-21 12:37:36 +01:00
Alexander Tokmakov
c235539620 minor fixes 2021-06-17 00:20:35 +03:00
tavplubix
92a028f8f0
Update clickhouse-test 2021-06-16 13:26:04 +03:00
tavplubix
710546b9e8
Merge branch 'master' into improve_replicated_database_tests 2021-06-16 13:24:32 +03:00
tavplubix
5b7ca80da2
Update clickhouse-test 2021-06-16 13:19:18 +03:00
Alexander Tokmakov
c873714698 improve replicated database tests 2021-06-15 23:52:29 +03:00
Ivan
0092cc61cf
Enable back the ANTLR in .sql (#25170)
* Enable back the ANTLR in .sql

* Update skip-list

* More tests to skip-list
2021-06-12 04:09:36 +03:00
Azat Khuzhin
95630a5c9d clickhouse-test: fix log_comment for .sql tests
Broken in: #23486
2021-06-05 12:59:58 +03:00
Azat Khuzhin
d641e7fa10 clickhouse-test: do not substitude db name in stderr by default
Replacing stderr by default does not makes a lot of sense, since it does
not compared with .reference anyway. From the other hand it may confuse
the reader (seeing "default" instead of real database name in the test
logs).

P.S. I guess some tests may relay on this, let's see.
2021-06-03 21:11:19 +03:00
Nikita Mikhaylov
e7867f885a
Merge pull request #24454 from nikitamikhaylov/retry-drop-database
Fix fast test
2021-05-24 21:00:37 +03:00
Nikita Mikhaylov
6997240237 done 2021-05-24 18:20:56 +03:00
Azat Khuzhin
12cc3fc4af clickhouse-test: fix stdout reference w/o --database argument
It was appended, but never truncated.
2021-05-22 14:07:21 +03:00
Nikolai Kochetov
48ce2ce500 Fix script 2021-05-20 22:57:06 +03:00
Nikolai Kochetov
87e73a970e Fix style 2021-05-20 21:18:44 +03:00
Nikolai Kochetov
e66e3e9271 Fix style 2021-05-20 21:11:12 +03:00
Nikolai Kochetov
386cbf751c Better parallelizm for fast tests. 2021-05-20 19:46:15 +03:00
Nikolai Kochetov
9d4927a5b9 Better parallelizm for fast tests. 2021-05-20 19:44:35 +03:00
Nikolai Kochetov
fa88e8725a Better parallelizm for fast tests. 2021-05-20 19:02:46 +03:00
alesapin
8c4f811152 One more error to retry 2021-05-19 21:35:05 +03:00
alesapin
21b751217d One more attempt to fix retries in clickhouse-test 2021-05-18 16:06:00 +03:00
alesapin
e7eae2688c Also retry database creation 2021-05-13 16:37:19 +03:00
alesapin
0dec8f77e4 Retry more errors in clickhouse-test 2021-05-11 20:33:44 +03:00
Azat Khuzhin
0b58a149d2 clickhouse-test: send TERM to all childs (to avoid hung check triggering)
This is another try of not leaving child processes in clickhouse-test,
first one was in [1] by @akuzm:

  "I tried to do this earlier with a separate process group + atexit callbacks:
  573983d407 (diff-3a359de18cacf146f406a7ae332fb47196aa5e0aa430eb4b157a202a3cb8e6e3R578)

  But that commit was later reverted because it also tried to switch to
  multithreading instead of multiprocessing, and that didn't go good.
  SIG_IGN and SIG_DFL were broken then
  (https://bugs.python.org/issue23395), now they are fixed but not quite
  but maybe it's not relevant for us."

I looked (only briefly) through that bug report in python, but I don't
see any issues with killing child processes during testing this patch.

Plus to me it is better to get some unknown python error (and fix it
somehow) instead of leaving child processes.

v2: correctly catch INT/TERM/HUP too
2021-05-01 08:46:59 +03:00
Azat Khuzhin
2cf931e08b clickhouse-test: add missing whitespace before printing database on error 2021-04-30 21:30:02 +03:00
Azat Khuzhin
56774f9c49 clickhouse-test: print database name on failures
Useful for debugging, i.e. to distingiush test failures for flaky check
2021-04-22 22:30:01 +03:00
Alexander Tokmakov
51d2932fe8 print errors on db creation in clickhouse-test 2021-04-19 14:03:20 +03:00
alexey-milovidov
e1e2f534e8
Merge pull request #22646 from azat/clickhouse-test-log-comment
Add log_comment setting for DROP/CREATE DATABASE in clickhouse-test
2021-04-06 14:48:04 +03:00
Azat Khuzhin
624b2632cc Add log_comment setting for DROP/CREATE DATABASE in clickhouse-test 2021-04-05 06:58:54 +03:00
Alexey Milovidov
1bd4febfd5 Better retries on ZK errors in sh tests 2021-04-05 05:17:17 +03:00
Alexander Kuzmenkov
b67f48999c Merge remote-tracking branch 'origin/master' into HEAD 2021-03-31 16:27:19 +03:00
tavplubix
049019bdb2
Update clickhouse-test 2021-03-30 20:27:58 +03:00
Alexander Tokmakov
500a20f30d Merge branch 'master' into test_multiple_nodes 2021-03-30 16:23:33 +03:00
Alexander Kuzmenkov
f2325b62f4 Merge remote-tracking branch 'origin/aku/flaky-stateless' into HEAD 2021-03-30 14:04:02 +03:00
Alexander Kuzmenkov
27635fd381 create two batches per process in clickhouse-test 2021-03-30 14:03:00 +03:00
Alexander Kuzmenkov
6bd483f9d4 individual tmp dir matching the database for each test run 2021-03-30 03:39:33 +03:00
Alexander Kuzmenkov
58987a973d flush 2021-03-30 01:42:37 +03:00
Alexander Kuzmenkov
47cc8938f9 faster 2021-03-29 22:12:20 +03:00
Alexander Kuzmenkov
2b7d2fab82 less flaky functional tests 2021-03-29 22:12:20 +03:00
Alexander Kuzmenkov
72f8b42d63 more info 2021-03-29 21:19:13 +03:00
Alexander Kuzmenkov
112cd107aa print elapsed time per test group 2021-03-29 21:14:06 +03:00
Alexander Kuzmenkov
fe2a364e09 faster 2021-03-29 19:26:50 +03:00
Alexander Kuzmenkov
0dfd091011 less flaky functional tests 2021-03-26 19:40:26 +03:00
Alexander Tokmakov
fdae70df6c fix tests 2021-03-18 15:50:03 +03:00
Alexander Tokmakov
735acf27d8 try run stateful tests 2021-03-16 19:39:31 +03:00
Alexander Tokmakov
ab07b3b516 Merge branch 'distributed_ddl_improvements' into test_multiple_nodes 2021-03-15 21:22:24 +03:00
alexey-milovidov
c9f14052bc
Merge pull request #21700 from azat/clickhouse-test-fix-log-comment
Fix log_comment for *.sh in clickhouse-test
2021-03-14 12:29:57 +03:00
Azat Khuzhin
334520557c Fix log_comment for *.sh in clickhouse-test
setdefault will set it only once
2021-03-13 18:15:16 +03:00
Alexander Tokmakov
e62e256e77 fix 2021-03-13 13:22:48 +03:00
Azat Khuzhin
eb3710c164 Fix error message in clickhouse-test
{} was not replaced:

    Cannot get server pid with {}, got {}: {} lsof -i tcp:9000 -s tcp:LISTEN -Fp | awk '/^p[0-9]+$/{print substr($0, 2)}' b'306\n1025011\n' invalid literal for int() with base 10: b'306\n1025011\n'
2021-03-13 08:43:41 +03:00
Alexander Tokmakov
8e00ff7898 try run two nodes with Replicated db and NuKeeper 2021-03-13 04:25:13 +03:00
Alexander Tokmakov
d46fee0f04 Merge branch 'master' into stress_test_results 2021-02-26 00:24:22 +03:00
Alexander Tokmakov
487b162343 fix 2021-02-22 16:53:43 +03:00
Alexander Tokmakov
eaed15b5e1 process result of func and unit tests 2021-02-20 23:04:24 +03:00
Alexander Tokmakov
033f55f498 fix 2021-02-19 17:38:20 +03:00
Alexander Tokmakov
4493c39bf7 fix 2021-02-19 12:57:09 +03:00
Alexander Tokmakov
9c7cf9e92e remove some debug code 2021-02-15 13:26:34 +03:00
Alexander Tokmakov
5e0cbfe972 Merge branch 'master' into database_replicated 2021-02-08 23:01:12 +03:00
Alexander Kuzmenkov
858043cd53 detect unmarked long tests in flaky check 2021-02-04 15:06:48 +03:00
Alexander Tokmakov
d010f97db0 Merge branch 'master' into database_replicated 2021-02-03 20:13:25 +03:00
Alexander Tokmakov
9da445e740 execute initial query in the same thread 2021-02-01 22:29:47 +03:00
Alexey Milovidov
feeb1243ec Fix Python 2021-01-29 06:26:53 +03:00
Alexey Milovidov
93f58257e4 Fix mistake 2021-01-29 04:45:24 +03:00
Alexey Milovidov
d6e34deeee Fix Python 2021-01-29 03:53:21 +03:00
Alexey Milovidov
a121a5250b Add log comment when running .sh tests 2021-01-28 20:31:34 +03:00
Alexander Kuzmenkov
348bbe85b2
Merge pull request #19715 from ClickHouse/aku/flaky-parallel
Run tests in parallel in flaky check
2021-01-28 19:16:28 +03:00
alesapin
879adc5437 Add new line to status 2021-01-28 11:55:20 +03:00
Alexander Kuzmenkov
f4f66e9537 try to use predictable names for stdout/err when possible 2021-01-27 21:37:28 +03:00
Alexander Kuzmenkov
8070562bd0 Run tests in parallel in flaky check 2021-01-27 18:24:39 +03:00
Azat Khuzhin
1ef38148ac Fix all pylint warnings in clickhouse-test 2021-01-26 23:36:04 +03:00
Azat Khuzhin
c4454ab095 Fix colored() usage in clickhouse-test 2021-01-26 23:23:00 +03:00
Alexander Tokmakov
f20d5e3b41 fix 2021-01-26 20:51:25 +03:00
Alexey Milovidov
9f8ab99dd1 Use log_comment in clickhouse-test 2021-01-25 22:29:29 +03:00
alesapin
18fb642e45 Check for hung queries in fast test 2021-01-25 11:53:04 +03:00
Alexander Kuzmenkov
eb7b87ee8d update tests 2021-01-21 21:01:32 +03:00
Alexander Kuzmenkov
ec8ff21526 Reconnect after client errors 2021-01-21 17:28:46 +03:00
Alexander Kuzmenkov
33b941b216 not sure why it doesn't like my f-strings 2021-01-20 10:01:26 +03:00
Alexander Kuzmenkov
107d83b654 Avoid mixing output from parallel test runs.
Also mark some tests as sequential-only.
2021-01-20 08:31:41 +03:00
Alexander Kuzmenkov
d0922e2985 Merge remote-tracking branch 'origin/master' into tmp 2021-01-18 23:23:49 +03:00
Alexey Milovidov
897d51b6e7 Usability improvement of clickhouse-test 2021-01-18 14:38:44 +03:00
Alexander Kuzmenkov
9d6730a846 small fixes 2021-01-16 00:33:53 +03:00
Ivan
35d62b73a7
Check for CLICKHOUSE_CLIENT_OPT env before setting it (#18574) 2020-12-28 18:47:44 +03:00
Ivan
ff80c1f3ce
Move --antlr arg outside of parser group 2020-12-25 15:59:02 +03:00
Ivan
5fd6f260ac
Add support for ANTLR inside clickhouse-test (#18319) 2020-12-22 15:24:46 +03:00
Alexey Milovidov
e6ab6badf9 Fix clickhouse-test 2020-12-22 00:03:41 +03:00
alesapin
ce2028e3ce Fix clickhouse-test 2020-12-21 14:19:12 +03:00
alesapin
30c98adde4 Fix local variable in clickhouse-test 2020-12-17 23:13:49 +03:00
alesapin
d873439846
Merge pull request #15236 from ClickHouse/run_func_tests_in_parallel
Collect list of non-parallel test
2020-12-16 19:29:32 +03:00
alesapin
2e4aa6b9e1 Kill not only database proc 2020-12-15 19:20:09 +03:00
alesapin
873d9d1e1e Better 2020-12-15 16:34:53 +03:00
alesapin
9bb0326fc6 Fix database drop timeout in clickhouse-test 2020-12-15 16:33:14 +03:00
alesapin
b68aa1c76d Merge branch 'master' into run_func_tests_in_parallel 2020-12-03 17:22:09 +03:00
myrrc
9ca35c0b44 Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-10-30 17:22:24 +03:00
alesapin
362b2c1cb2 Merge branch 'master' into run_func_tests_in_parallel 2020-10-28 14:12:45 +03:00
tavplubix
381af53d4a
Update clickhouse-test 2020-10-27 11:44:58 +03:00
myrrc
4d11bd036b Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-10-26 17:42:47 +03:00
alesapin
df4620b7bd Merge branch 'master' into run_func_tests_in_parallel 2020-10-20 17:15:56 +03:00
Alexander Kuzmenkov
f46887dcaa improve fasttest usability 2020-10-15 20:29:07 +03:00
myrrc
8e7e232387 wip dealing with template magic 2020-10-15 13:36:00 +03:00
myrrc
d48114b79a Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-10-12 14:17:44 +03:00
myrrc
09862fb1ba typo 2020-10-12 14:17:35 +03:00
alesapin
2b66180c70 Merge branch 'master' into run_func_tests_in_parallel 2020-10-09 10:25:35 +03:00
Anton Popov
e0bc669423 run check with wide parts 2020-10-07 21:53:34 +03:00
alesapin
d8f7dce286 Merge branch 'master' into run_func_tests_in_parallel 2020-10-02 21:45:43 +03:00
Azat Khuzhin
9cb3c743bd
Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
alesapin
91ba9c2e5f Merge branch 'master' into run_func_tests_in_parallel 2020-10-02 10:44:34 +03:00
alexey-milovidov
adb83d920a
Merge pull request #15267 from ClickHouse/clickhouse-test-fail-early
Fail more quickly in clickhouse-test if server does not respond
2020-09-26 07:28:34 +03:00
alesapin
bedab199af Fix category name 2020-09-25 16:20:16 +03:00
alesapin
987a46faee Merge branch 'master' into run_func_tests_in_parallel 2020-09-25 16:16:42 +03:00
alexey-milovidov
049f21091e
Update clickhouse-test 2020-09-25 08:05:50 +03:00
Alexey Milovidov
161ee1df3e Fail more quickly in clickhouse-test if server does not respond 2020-09-25 05:27:13 +03:00
Alexander Tokmakov
fb826557b7 Merge branch 'master' into enable_atomic_database_by_default 2020-09-25 02:04:01 +03:00
alesapin
8e9013561d Trying to split tests in sequential and parallel 2020-09-24 17:54:10 +03:00
Alexander Tokmakov
13e41cdd20 try enable atomic database by default 2020-09-21 13:55:34 +03:00
Anton Popov
8a201a28c0 remove skip list for tests with polymorphic parts 2020-09-11 03:14:35 +03:00
alexey-milovidov
aa3a19d8c0
Update clickhouse-test 2020-08-27 15:20:59 +03:00
alesapin
d40e203ecd Add ability to add comments in skip-list.json 2020-08-27 11:17:01 +03:00
Alexey Milovidov
07596b5323 Limit stress test to one hour 2020-08-26 20:44:03 +03:00
Alexander Kuzmenkov
2a2775b378
Merge pull request #13615 from myrrc/docs/ci
CI checks md file
2020-08-20 23:48:51 +03:00
Alexander Kuzmenkov
cac3fa3e45 review fixes 2020-08-20 22:44:00 +03:00
Alexey Milovidov
88f4bad0db Better diagnostics in clickhouse-test 2020-08-15 13:03:51 +03:00
Alexander Kuzmenkov
0349b75cb4 some updates 2020-08-13 21:45:55 +03:00
Alexander Tokmakov
a5d74c44f1 run stress tests with Atomic database 2020-08-13 20:55:12 +03:00
alesapin
46991b8c66 Flush stdout in tests 2020-07-15 12:59:45 +03:00
alesapin
ecea1e0292 Run tests in parallel 2020-07-15 11:49:50 +03:00
alesapin
0d5c747b86 Return strange line from clickhouse-test 2020-07-09 21:59:32 +03:00
alesapin
069880a003 Prototype 2020-07-08 16:06:35 +03:00
alesapin
dc8051f737 Fixes 2020-07-08 12:47:14 +03:00
alesapin
cd9a71b19c
Update clickhouse-test 2020-07-03 16:01:02 +03:00
alesapin
5098df8d0b Make skip-list optional 2020-07-03 14:15:30 +03:00
alesapin
07cbb427a8 More verbose message about skip 2020-07-03 14:05:27 +03:00
alesapin
d015a4d646 Move skip lists to clickhouse-test 2020-07-03 13:57:16 +03:00
Alexander Kuzmenkov
c678708c0c Put clickhouse-local data to /tmp by default
This fixes https://github.com/ClickHouse/ClickHouse/issues/9848
Also fixes https://github.com/ClickHouse/ClickHouse/issues/11926
2020-06-24 22:03:28 +03:00
Alexey Milovidov
d5d3251d3f Stop tests on fatal errors 2020-06-22 22:32:33 +03:00
Alexey Milovidov
293241cc22 Better check for hung queries in clickhouse-test 2020-05-31 17:57:29 +03:00
alexey-milovidov
94887f0c74
Merge pull request #11285 from ClickHouse/fix_fixed_database_tests
Add retries in clickhouse-test before server start
2020-05-29 23:54:36 +03:00
alesapin
bd03d1acb9 Remove hardcoded database from some tests and add retries to clickhouse-test 2020-05-29 13:08:11 +03:00
Alexey Milovidov
025c1a8830 Added another check #11170 2020-05-29 03:46:42 +03:00
Alexey Milovidov
5548c9d1ad Repeat test on curl timeout 2020-05-29 01:53:15 +03:00
alesapin
3d9ba9ff8a Revert #11023 2020-05-25 13:06:27 +03:00
Azat Khuzhin
e9dc2cbcf7 Add missing SYSTEM FLUSH LOGS before TRUNCATE TABLE in clickhouse-test
Suggested-by: @filimonov
2020-05-19 01:12:51 +03:00
Azat Khuzhin
bdbfa08e02 Truncate system.*_log by default in tests
Enable it by default due to:
- it is a sane default
- avoids modifying docker images
2020-05-18 21:18:37 +03:00
Alexey Milovidov
0faf7bc39b clickhouse-test: create unique database for every test (part 2) 2020-05-13 23:17:12 +03:00
Alexey Milovidov
6c671eb6a6 clickhouse-test: recreate database for every test (part 1) 2020-05-13 23:03:10 +03:00
Azat Khuzhin
989ae58a0c Force clickhouse-test to use python2 2020-04-28 22:45:22 +03:00
alesapin
0afd361933 Fix subprocess call in clickhouse-test 2020-04-20 17:20:06 +03:00
Alexander Kuzmenkov
1927212f67 Filter out some tests that require Zookeeper. 2020-04-17 23:36:08 +03:00
Ivan
97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00