Commit Graph

25 Commits

Author SHA1 Message Date
robot-clickhouse
7c6ce8611c Automatic style fix 2024-09-27 10:19:49 +00:00
Kruglov Pavel
3fd50ed856
Fix flaky test test_distributed_replica_max_ignored_errors 2024-08-21 16:23:37 +02:00
JackyWoo
f3bf1f8da9 Fix code style 2023-09-27 12:56:06 +08:00
JackyWoo
5da03e8ba5 Add load balancing test_hostname_levenshtein_distance 2023-09-27 10:46:39 +08:00
Azat Khuzhin
dc353faf44 Simplify obtaining query shard in test_distributed_load_balancing
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-19 06:07:58 +02:00
Azat Khuzhin
e37e8f83bb Fix flakiness of test_distributed_load_balancing
I saw the following in the logs for the failed test:

    2023.05.16 07:12:12.894051 [ 262 ] {74575ac0-b296-4fdc-bc8e-3476a305e6ea} <Warning> ConnectionPoolWithFailover: Connection failed at try №1, reason: Timeout exceeded while reading from socket (socket (172.16.3.2:9000), receive timeout 2000 ms)

And I think that the culprit is the
test_distributed_replica_max_ignored_errors for which it is normal,
however not for others, and this should not affect other tests.

So fix this by calling SYSTEM RELOAD CONFIG, which should reset error
count.

CI: https://s3.amazonaws.com/clickhouse-test-reports/49380/5abc1a1c68ee204c9024493be1d19835cf5630f7/integration_tests__release__[3_4].html
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-05-19 06:07:58 +02:00
Kruglov Pavel
353791b2dd
Try to fix flaky test_distributed_load_balancing tests (#49912)
* Try to fix flaky test_distributed_load_balancing tests

* Automatic style fix

---------

Co-authored-by: robot-clickhouse <robot-clickhouse@users.noreply.github.com>
Co-authored-by: Alexander Tokmakov <tavplubix@clickhouse.com>
2023-05-16 18:26:22 +03:00
Alexey Milovidov
b42d26acfe Remove one line from XML, because we do not care 2022-08-28 02:44:02 +02:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
Alexey Milovidov
e513a5db32 Change <yandex> to <clickhouse> in configs 2021-09-20 01:38:53 +03:00
Azat Khuzhin
4b10b978e8 Increase number of iterations in test_distributed_load_balancing (fixes flakiness)
Before there was some flakiness, because for 15 iterations it does
generate all unique values (3 unique nodes) [1].

  [1]: https://clickhouse-test-reports.s3.yandex.net/28604/9911b3ea368a7745934517747e62db3217cddb00/integration_tests_(thread).html#fail1

I've tried other techincs (cap random value to the maximum number of
nodes, other RNG, but these does not solve it either).
2021-09-08 10:49:01 +03:00
Azat Khuzhin
b243dec4b5 tests/integration/test_distributed_load_balancing: fix pylint warnings 2021-09-08 09:47:05 +03:00
Pavel Kruglov
bc6fe4f28c Minor fixes 2021-02-17 20:44:11 +03:00
Pavel Kruglov
1b78de2142 Use fibers in HedgedRequests 2021-02-17 20:34:52 +03:00
Pavel Kruglov
0e1d67ad9a Add LOG_DEBUG to debug test_distributed_load_balancing 2021-02-16 10:56:45 +03:00
Alexey Milovidov
c7b678b752 Fix integration test 2021-01-04 02:20:12 +03:00
Mikhail Filimonov
41971e073a
Fix typos reported by codespell 2020-10-27 12:04:03 +01:00
Azat Khuzhin
9cb3c743bd
Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
bharatnc
b75963d370 Format and optimize imports in integration test files
This PR formats all the `*.py` files found under the `tests/integration`
folder. It also reorders the imports and cleans up a bunch of unused
imports.

The formatting also takes care of other things like wrapping lines and
fixing spaces and indents such that the tests look more readable.
2020-09-15 23:10:54 -07:00
Azat Khuzhin
0eb9c8e430 Add a test with negative priority in test_distributed_load_balancing 2020-06-30 11:10:30 +03:00
Azat Khuzhin
beb341275c Cover <replica> <priority> in test_distributed_load_balancing 2020-06-29 23:03:28 +03:00
Azat Khuzhin
72db50fe22 Drop TODO about possible failures from test_distributed_load_balancing
Fixed in: #11669 bd45592539 ("Fix
test_distributed_load_balancing flaps (due to config reload)")
2020-06-29 23:03:28 +03:00
Azat Khuzhin
bd45592539 Fix test_distributed_load_balancing flaps (due to config reload)
At startup, server loads configuration files.

However ConfigReloader does not know about already loaded files (files
is empty()), hence it will always reload the configuration just after
server starts (+ 2 seconds, reload timeout).

And on configuration reload the clusters will be re-created, so some
internal stuff will be reseted:
- error_count
- last_used (round_robing)

And if the reload will happen during round_robin test it will start
querying from the beginning, so let's issue config reload just after
start to avoid reload in the middle of the test execution.
2020-06-21 12:01:15 +03:00
Azat Khuzhin
9bfda65134 Add a test for distributed_replica_max_ignored_errors 2020-06-20 11:21:08 +03:00
Azat Khuzhin
9386478a77 Add test for load_balancing algorithms 2020-06-14 01:09:22 +03:00