mirror of
https://github.com/hanzo-ds/connect.git
synced 2026-10-30 20:31:24 +00:00
The wire protocol was the last holdout and it was not cosmetic: the Hanzo Datastore server reads X-Datastore-User, and answers a request bearing X-ClickHouse-User with 401. Verified against the live server, both directions. So a client still sending the old headers is not merely off-brand, it cannot authenticate over HTTP. Everything else follows: types, dialects, error modules, docstrings and doc links now name Datastore, and doc URLs point at docs.hanzo.ai/datastore rather than the upstream vendor's site. Zero occurrences of the old name remain. Still cut from the pinned upstream version, so behaviour is unchanged.
30 lines
835 B
Python
30 lines
835 B
Python
import threading
|
|
|
|
import pytest
|
|
|
|
from datastore_connect.driver import Client
|
|
from datastore_connect.driver.exceptions import ProgrammingError
|
|
from tests.integration_tests.conftest import TestConfig
|
|
|
|
|
|
def test_threading_error(test_config: TestConfig, test_client: Client):
|
|
if test_config.cloud:
|
|
pytest.skip('Skipping threading test in Datastore Cloud')
|
|
thrown = None
|
|
|
|
class QueryThread (threading.Thread):
|
|
def run(self):
|
|
nonlocal thrown
|
|
try:
|
|
test_client.command('SELECT randomString(512) FROM numbers(1000000)')
|
|
except ProgrammingError as ex:
|
|
thrown = ex
|
|
|
|
threads = [QueryThread(), QueryThread()]
|
|
for thread in threads:
|
|
thread.start()
|
|
for thread in threads:
|
|
thread.join()
|
|
|
|
assert 'concurrent' in str(thrown)
|