diff --git a/opengemini_client/models.py b/opengemini_client/models.py index dd7b576..1faa75f 100644 --- a/opengemini_client/models.py +++ b/opengemini_client/models.py @@ -34,11 +34,11 @@ class BatchConfig: @dataclass class Config: address: List[Address] - batch_config: BatchConfig - timeout: timedelta - connection_timeout: timedelta - gzip_enabled: bool - tls_enabled: bool + batch_config: BatchConfig = None + timeout: timedelta = None + connection_timeout: timedelta = None + gzip_enabled: bool = False + tls_enabled: bool = False auth_config: AuthConfig = None tls_config: ssl.SSLContext = None diff --git a/opengemini_client/test_utils.py b/opengemini_client/test_utils.py index d6f6ba8..7bc112d 100644 --- a/opengemini_client/test_utils.py +++ b/opengemini_client/test_utils.py @@ -1,15 +1,8 @@ -import datetime - from opengemini_client import client_impl from opengemini_client import models def get_test_default_client(): - cfg = models.Config(address=[models.Address(host='127.0.0.1', port=8086)], - batch_config=models.BatchConfig(batch_size=10, batch_interval=10), - timeout=datetime.timedelta(seconds=10), - connection_timeout=datetime.timedelta(seconds=10), - gzip_enabled=False, tls_enabled=False - ) + cfg = models.Config(address=[models.Address(host='127.0.0.1', port=8086)]) cli = client_impl.OpenGeminiDBClient(cfg) return cli