diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9213f00..a367d9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -702,6 +702,11 @@ jobs: run: | pip install -r requirements.txt --trusted-host https://test.pypi.org pytest testcases/test_cdc_database.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 + pytest testcases/test_cdc_get.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 + pytest testcases/test_cdc_list.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 + pytest testcases/test_cdc_delete.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 + pytest testcases/test_cdc_pause.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 + pytest testcases/test_cdc_resume.py --upstream_host 127.0.0.1 --upstream_port 19530 --downstream_host 127.0.0.1 --downstream_port 19500 - name: List CDC task if: ${{ always() }} diff --git a/tests/testcases/test_cdc_resume.py b/tests/testcases/test_cdc_resume.py index 9b03e25..5c2e847 100644 --- a/tests/testcases/test_cdc_resume.py +++ b/tests/testcases/test_cdc_resume.py @@ -19,11 +19,14 @@ class TestCdcResume(TestBase): """ Test Milvus CDC delete """ def test_cdc_resume_task(self, upstream_host, upstream_port, downstream_host, downstream_port): - """ - target: test cdc delete task - method: create task, delete task - expected: create successfully, delete successfully - """ + collection_name1 = prefix + datetime.now().strftime('%Y_%m_%d_%H_%M_%S_%f') + collection_name2 = prefix + datetime.now().strftime('%Y_%m_%d_%H_%M_%S_%f') + task_id1 = self.test_create_cdc_task(upstream_host, upstream_port, downstream_host, downstream_port, collection_name1) + task_id2 = self.test_create_cdc_task(upstream_host, upstream_port, downstream_host, downstream_port, collection_name2) + self.test_cdc_resume_task_with_collection_name(upstream_host, upstream_port, downstream_host, downstream_port, collection_name1, task_id1) + self.test_cdc_resume_task_with_collection_name(upstream_host, upstream_port, downstream_host, downstream_port, collection_name2, task_id2) + + def test_create_cdc_task(self, upstream_host, upstream_port, downstream_host, downstream_port, collection_name): collection_name = prefix + datetime.now().strftime('%Y_%m_%d_%H_%M_%S_%f') # create cdc task request_data = { @@ -47,6 +50,14 @@ def test_cdc_resume_task(self, upstream_host, upstream_port, downstream_host, do assert result log.info(f"create task response: {rsp}") task_id = rsp['task_id'] + return task_id + + def test_cdc_resume_task_with_collection_name(self, upstream_host, upstream_port, downstream_host, downstream_port, collection_name, task_id): + """ + target: test cdc delete task + method: create task, delete task + expected: create successfully, delete successfully + """ # create collection and insert entities into it in upstream connections.connect(host=upstream_host, port=upstream_port) checker = InsertEntitiesCollectionChecker(host=upstream_host, port=upstream_port, c_name=collection_name)