mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-28 18:42:26 +00:00
Merge pull request #28066 from ClickHouse/fix_zookeeper_secure_test
Fix zookeeper secure client test
This commit is contained in:
commit
167d34051c
@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
import threading
|
||||
import os
|
||||
from tempfile import NamedTemporaryFile
|
||||
@ -35,15 +33,18 @@ def started_cluster():
|
||||
|
||||
# NOTE this test have to be ported to Keeper
|
||||
def test_secure_connection(started_cluster):
|
||||
assert node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'") == '2\n'
|
||||
assert node2.query("SELECT count() FROM system.zookeeper WHERE path = '/'") == '2\n'
|
||||
# no asserts, connection works
|
||||
node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'")
|
||||
node2.query("SELECT count() FROM system.zookeeper WHERE path = '/'")
|
||||
|
||||
kThreadsNumber = 16
|
||||
kIterations = 100
|
||||
threads_number = 16
|
||||
iterations = 100
|
||||
threads = []
|
||||
for _ in range(kThreadsNumber):
|
||||
|
||||
# just checking for race conditions
|
||||
for _ in range(threads_number):
|
||||
threads.append(threading.Thread(target=(lambda:
|
||||
[node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'") for _ in range(kIterations)])))
|
||||
[node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'") for _ in range(iterations)])))
|
||||
|
||||
for thread in threads:
|
||||
thread.start()
|
||||
|
Loading…
Reference in New Issue
Block a user