@@ 155-171 (lines=17) @@ | ||
152 | status = connect.drop_collection(collection) |
|
153 | assert status.OK() |
|
154 | ||
155 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
156 | def test_add_vector_sleep_delete_another_collection(self, connect, collection): |
|
157 | ''' |
|
158 | target: test delete collection_1 collection after add vector to collection_2 for a while |
|
159 | method: add vector , sleep, and delete collection |
|
160 | expected: status ok |
|
161 | ''' |
|
162 | param = {'collection_name': gen_unique_str(), |
|
163 | 'dimension': dim, |
|
164 | 'index_file_size': index_file_size, |
|
165 | 'metric_type': MetricType.L2} |
|
166 | status = connect.create_collection(param) |
|
167 | vector = gen_single_vector(dim) |
|
168 | status, ids = connect.insert(collection, vector) |
|
169 | connect.flush([collection]) |
|
170 | status = connect.drop_collection(param['collection_name']) |
|
171 | assert status.OK() |
|
172 | ||
173 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
174 | def test_create_index_add_vector(self, connect, collection, get_simple_index): |
|
@@ 850-865 (lines=16) @@ | ||
847 | status, ids = connect.insert(ip_collection, vector) |
|
848 | assert not status.OK() |
|
849 | ||
850 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
851 | def test_drop_collection_add_vector_another(self, connect, ip_collection): |
|
852 | ''' |
|
853 | target: test add vector to collection_1 after collection_2 deleted |
|
854 | method: delete collection_2 and add vector to collection_1 |
|
855 | expected: status ok |
|
856 | ''' |
|
857 | param = {'collection_name': gen_unique_str(), |
|
858 | 'dimension': dim, |
|
859 | 'index_file_size': index_file_size, |
|
860 | 'metric_type': MetricType.L2} |
|
861 | status = connect.create_collection(param) |
|
862 | status = connect.drop_collection(ip_collection) |
|
863 | vector = gen_single_vector(dim) |
|
864 | status, ids = connect.insert(param['collection_name'], vector) |
|
865 | assert status.OK() |
|
866 | ||
867 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
868 | def test_add_vector_drop_collection(self, connect, ip_collection): |
|
@@ 96-111 (lines=16) @@ | ||
93 | status, ids = connect.insert(collection, vector) |
|
94 | assert not status.OK() |
|
95 | ||
96 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
97 | def test_drop_collection_add_vector_another(self, connect, collection): |
|
98 | ''' |
|
99 | target: test add vector to collection_1 after collection_2 deleted |
|
100 | method: delete collection_2 and add vector to collection_1 |
|
101 | expected: status ok |
|
102 | ''' |
|
103 | param = {'collection_name': gen_unique_str(), |
|
104 | 'dimension': dim, |
|
105 | 'index_file_size': index_file_size, |
|
106 | 'metric_type': MetricType.L2} |
|
107 | status = connect.create_collection(param) |
|
108 | status = connect.drop_collection(collection) |
|
109 | vector = gen_single_vector(dim) |
|
110 | status, ids = connect.insert(param['collection_name'], vector) |
|
111 | assert status.OK() |
|
112 | ||
113 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
114 | def test_add_vector_drop_collection(self, connect, collection): |