From 923aa84f47884f03d1f56721caef5b5f5ef49080 Mon Sep 17 00:00:00 2001 From: "Harris.Chu" <1726587+HarrisChu@users.noreply.github.com> Date: Mon, 30 Jan 2023 13:04:56 +0800 Subject: [PATCH] enhance readme (#256) --- README.md | 4 ++-- setup.py | 2 +- tests/docker-compose-ssl.yaml | 3 +++ tests/docker-compose.yaml | 3 +++ tests/test_session.py | 6 ++++-- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index cabde66a..70f7acd0 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # nebula-python -This repository holds the official Python API for Nebula Graph. +This repository holds the official Python API for NebulaGraph. ## Before you start -Before you start, please read this section to choose the right branch for you. The compatibility between the API and Nebula Graph service can be found in [How to choose nebula-python](##How-to-choose-nebula-python). The current master branch is compatible with Nebula Graph 3.3. +Before you start, please read this section to choose the right branch for you. The compatibility between the API and NebulaGraph service can be found in [How to choose nebula-python](##How-to-choose-nebula-python). The current master branch is compatible with NebulaGraph 3.3. ## The directory structure diff --git a/setup.py b/setup.py index 0dfa7ae3..89d5ac9d 100644 --- a/setup.py +++ b/setup.py @@ -18,7 +18,7 @@ license='Apache 2.0', author='vesoft-inc', author_email='info@vesoft.com', - description='Python client for Nebula Graph V3.0', + description='Python client for NebulaGraph V3.0', long_description=long_description, long_description_content_type='text/markdown', url='https://github.com/vesoft-inc/nebula-python', diff --git a/tests/docker-compose-ssl.yaml b/tests/docker-compose-ssl.yaml index d095584e..e436c49c 100644 --- a/tests/docker-compose-ssl.yaml +++ b/tests/docker-compose-ssl.yaml @@ -280,6 +280,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 @@ -323,6 +324,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 @@ -366,6 +368,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 diff --git a/tests/docker-compose.yaml b/tests/docker-compose.yaml index 40ae83f9..723a8531 100644 --- a/tests/docker-compose.yaml +++ b/tests/docker-compose.yaml @@ -280,6 +280,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 @@ -323,6 +324,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 @@ -366,6 +368,7 @@ services: - --cert_path=${cert_path} - --key_path=${key_path} - --enable_ssl=${enable_ssl} + - --session_reclaim_interval_secs=3 depends_on: - metad0 - metad1 diff --git a/tests/test_session.py b/tests/test_session.py index 383623ba..af30c8ed 100644 --- a/tests/test_session.py +++ b/tests/test_session.py @@ -45,10 +45,12 @@ def get_local_session(pool): def test_2_reconnect(self): try: session = self.pool.get_session('root', 'nebula') + # wait for the session update + time.sleep(2) session.execute( 'CREATE SPACE IF NOT EXISTS test_session(vid_type=FIXED_STRING(8)); USE test_session;' ) - time.sleep(3) + time.sleep(10) for i in range(0, 5): if i == 3: os.system('docker stop tests_graphd0_1') @@ -56,7 +58,7 @@ def test_2_reconnect(self): time.sleep(3) # the session update later, the expect test # resp = session.execute('SHOW TAGS') - resp = session.execute('SHOW HOSTS') + resp = session.execute('SHOW SESSIONS') assert resp.is_succeeded(), resp.error_msg() assert resp.space_name() == 'test_session' time.sleep(2)