More stable kill in integration tests

This commit is contained in:
alesapin 2019-12-17 21:07:13 +03:00
parent 5aed72a126
commit 30aa42784a
2 changed files with 7 additions and 1 deletions

View File

@ -684,6 +684,10 @@ class ClickHouseInstance:
time.sleep(0.5)
local_counter += 1
# force kill if server hangs
if self.get_process_pid("clickhouse server"):
self.exec_in_container(["bash", "-c", "pkill -{} clickhouse".format(9)], user='root')
if callback_onstop:
callback_onstop(self)
self.exec_in_container(

View File

@ -329,12 +329,14 @@ def test_version_update_two_nodes(start_dynamic_cluster):
node11.query("SYSTEM SYNC REPLICA table_with_default_granularity_new", timeout=5)
node12.query("INSERT INTO table_with_default_granularity_new VALUES (toDate('2018-10-01'), 3, 333), (toDate('2018-10-02'), 4, 444)")
node11.restart_with_latest_version(signal=9) # just to be sure
node11.restart_with_latest_version() # just to be sure
node11.query("SYSTEM SYNC REPLICA table_with_default_granularity_new", timeout=5)
node12.query("SYSTEM SYNC REPLICA table_with_default_granularity_new", timeout=5)
node11.query("SELECT COUNT() FROM table_with_default_granularity_new") == "4\n"
node12.query("SELECT COUNT() FROM table_with_default_granularity_new") == "4\n"
node11.query("SYSTEM SYNC REPLICA table_with_default_granularity")
node11.query("INSERT INTO table_with_default_granularity VALUES (toDate('2018-10-01'), 5, 333), (toDate('2018-10-02'), 6, 444)")
node12.query("SYSTEM SYNC REPLICA table_with_default_granularity")
assert node12.query("SELECT COUNT() FROM table_with_default_granularity") == '6\n'