mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Merge pull request #21456 from nikitamikhaylov/zookeeper-secure-race
Fix race in SecureSocket
This commit is contained in:
commit
39b59e86b0
2
contrib/poco
vendored
2
contrib/poco
vendored
@ -1 +1 @@
|
||||
Subproject commit fbaaba4a02e29987b8c584747a496c79528f125f
|
||||
Subproject commit c55b91f394efa9c238c33957682501681ef9b716
|
@ -1,6 +1,7 @@
|
||||
|
||||
|
||||
import time
|
||||
import threading
|
||||
from os import path as p, unlink
|
||||
from tempfile import NamedTemporaryFile
|
||||
|
||||
@ -174,6 +175,20 @@ def test_secure_connection():
|
||||
assert node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'") == '2\n'
|
||||
assert node2.query("SELECT count() FROM system.zookeeper WHERE path = '/'") == '2\n'
|
||||
|
||||
|
||||
kThreadsNumber = 16
|
||||
kIterations = 100
|
||||
threads = []
|
||||
for _ in range(kThreadsNumber):
|
||||
threads.append(threading.Thread(target=(lambda:
|
||||
[node1.query("SELECT count() FROM system.zookeeper WHERE path = '/'") for _ in range(kIterations)])))
|
||||
|
||||
for thread in threads:
|
||||
thread.start()
|
||||
|
||||
for thread in threads:
|
||||
thread.join()
|
||||
|
||||
finally:
|
||||
cluster.shutdown()
|
||||
unlink(docker_compose.name)
|
||||
|
Loading…
Reference in New Issue
Block a user