Merge pull request #22151 from azat/tests-sleep_in_send_ms

Fix sleep_in_send_tables_status_ms/sleep_in_send_data_ms in integration tests
This commit is contained in:
Kruglov Pavel 2021-03-26 21:22:32 +03:00 committed by GitHub
commit c86202dd09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 12 deletions

View File

@ -12,7 +12,7 @@ NODES = {'node' + str(i): None for i in (1, 2)}
config = '''<yandex>
<profiles>
<default>
<sleep_in_send_data>{sleep_in_send_data}</sleep_in_send_data>
<sleep_in_send_data_ms>{sleep_in_send_data_ms}</sleep_in_send_data_ms>
</default>
</profiles>
</yandex>'''
@ -45,12 +45,12 @@ def started_cluster():
def test(started_cluster):
NODES['node2'].replace_config('/etc/clickhouse-server/users.d/users.xml', config.format(sleep_in_send_data=1000))
NODES['node2'].replace_config('/etc/clickhouse-server/users.d/users.xml', config.format(sleep_in_send_data_ms=1000000))
attempts = 0
while attempts < 1000:
setting = NODES['node2'].http_query("SELECT value FROM system.settings WHERE name='sleep_in_send_data'")
if int(setting) == 1000:
setting = NODES['node2'].http_query("SELECT value FROM system.settings WHERE name='sleep_in_send_data_ms'")
if int(setting) == 1000000:
break
time.sleep(0.1)
attempts += 1

View File

@ -1,8 +0,0 @@
<?xml version="1.0"?>
<yandex>
<profiles>
<default>
<sleep_in_send_tables_status>5</sleep_in_send_tables_status>
</default>
</profiles>
</yandex>