|
@@ 351-367 (lines=17) @@
|
| 348 |
|
status, result = connect.search(collection, 1, vector) |
| 349 |
|
assert status.OK() |
| 350 |
|
|
| 351 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 352 |
|
def test_add_vector_sleep_search_vector_another(self, connect, collection): |
| 353 |
|
''' |
| 354 |
|
target: test add vector to collection_1 after search collection_2 a while |
| 355 |
|
method: search collection , sleep, and add vector |
| 356 |
|
expected: status ok |
| 357 |
|
''' |
| 358 |
|
param = {'collection_name': gen_unique_str(), |
| 359 |
|
'dimension': dim, |
| 360 |
|
'index_file_size': index_file_size, |
| 361 |
|
'metric_type': MetricType.L2} |
| 362 |
|
status = connect.create_collection(param) |
| 363 |
|
vector = gen_single_vector(dim) |
| 364 |
|
status, ids = connect.insert(collection, vector) |
| 365 |
|
connect.flush([collection]) |
| 366 |
|
status, result = connect.search(param['collection_name'], 1, vector) |
| 367 |
|
assert status.OK() |
| 368 |
|
|
| 369 |
|
""" |
| 370 |
|
****************************************************************** |
|
@@ 1050-1065 (lines=16) @@
|
| 1047 |
|
status, ids = connect.insert(ip_collection, vector) |
| 1048 |
|
assert status.OK() |
| 1049 |
|
|
| 1050 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 1051 |
|
def test_search_vector_add_vector_another(self, connect, ip_collection): |
| 1052 |
|
''' |
| 1053 |
|
target: test add vector to collection_1 after search collection_2 |
| 1054 |
|
method: search collection and add vector |
| 1055 |
|
expected: status ok |
| 1056 |
|
''' |
| 1057 |
|
param = {'collection_name': gen_unique_str(), |
| 1058 |
|
'dimension': dim, |
| 1059 |
|
'index_file_size': index_file_size, |
| 1060 |
|
'metric_type': MetricType.L2} |
| 1061 |
|
status = connect.create_collection(param) |
| 1062 |
|
vector = gen_single_vector(dim) |
| 1063 |
|
status, result = connect.search(ip_collection, 1, vector) |
| 1064 |
|
status, ids = connect.insert(param['collection_name'], vector) |
| 1065 |
|
assert status.OK() |
| 1066 |
|
|
| 1067 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 1068 |
|
def test_add_vector_search_vector(self, connect, ip_collection): |
|
@@ 321-336 (lines=16) @@
|
| 318 |
|
status, result = connect.search(collection, 1, vector) |
| 319 |
|
assert status.OK() |
| 320 |
|
|
| 321 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 322 |
|
def test_add_vector_search_vector_another(self, connect, collection): |
| 323 |
|
''' |
| 324 |
|
target: test add vector to collection_1 after search collection_2 |
| 325 |
|
method: search collection and add vector |
| 326 |
|
expected: status ok |
| 327 |
|
''' |
| 328 |
|
param = {'collection_name': gen_unique_str(), |
| 329 |
|
'dimension': dim, |
| 330 |
|
'index_file_size': index_file_size, |
| 331 |
|
'metric_type': MetricType.L2} |
| 332 |
|
status = connect.create_collection(param) |
| 333 |
|
vector = gen_single_vector(dim) |
| 334 |
|
status, ids = connect.insert(collection, vector) |
| 335 |
|
status, result = connect.search(param['collection_name'], 1, vector) |
| 336 |
|
assert status.OK() |
| 337 |
|
|
| 338 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 339 |
|
def test_add_vector_sleep_search_vector(self, connect, collection): |
|
@@ 290-305 (lines=16) @@
|
| 287 |
|
status, ids = connect.insert(collection, vector) |
| 288 |
|
assert status.OK() |
| 289 |
|
|
| 290 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 291 |
|
def test_search_vector_add_vector_another(self, connect, collection): |
| 292 |
|
''' |
| 293 |
|
target: test add vector to collection_1 after search collection_2 |
| 294 |
|
method: search collection and add vector |
| 295 |
|
expected: status ok |
| 296 |
|
''' |
| 297 |
|
param = {'collection_name': gen_unique_str(), |
| 298 |
|
'dimension': dim, |
| 299 |
|
'index_file_size': index_file_size, |
| 300 |
|
'metric_type': MetricType.L2} |
| 301 |
|
status = connect.create_collection(param) |
| 302 |
|
vector = gen_single_vector(dim) |
| 303 |
|
status, result = connect.search(collection, 1, vector) |
| 304 |
|
status, ids = connect.insert(param['collection_name'], vector) |
| 305 |
|
assert status.OK() |
| 306 |
|
|
| 307 |
|
@pytest.mark.timeout(ADD_TIMEOUT) |
| 308 |
|
def test_add_vector_search_vector(self, connect, collection): |