@@ 494-506 (lines=13) @@ | ||
491 | assert status.OK() |
|
492 | assert len(ids) == nq |
|
493 | ||
494 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
495 | def test_insert_tag_A(self, connect, collection): |
|
496 | ''' |
|
497 | target: test add vectors in collection created before |
|
498 | method: create partition and add vectors in it |
|
499 | expected: the collection row count equals to nq |
|
500 | ''' |
|
501 | nq = 5 |
|
502 | vectors = gen_vectors(nq, dim) |
|
503 | status = connect.create_partition(collection, tag) |
|
504 | status, ids = connect.insert(collection, vectors, partition_tag=tag) |
|
505 | assert status.OK() |
|
506 | assert len(ids) == nq |
|
507 | ||
508 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
509 | def test_insert_tag_not_existed(self, connect, collection): |
|
@@ 480-492 (lines=13) @@ | ||
477 | assert status.OK() |
|
478 | assert len(ids) == nq |
|
479 | ||
480 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
481 | def test_insert_tag(self, connect, collection): |
|
482 | ''' |
|
483 | target: test add vectors in collection created before |
|
484 | method: create collection and add vectors in it, with the partition_tag param |
|
485 | expected: the collection row count equals to nq |
|
486 | ''' |
|
487 | nq = 5 |
|
488 | vectors = gen_vectors(nq, dim) |
|
489 | status = connect.create_partition(collection, tag) |
|
490 | status, ids = connect.insert(collection, vectors, partition_tag=tag) |
|
491 | assert status.OK() |
|
492 | assert len(ids) == nq |
|
493 | ||
494 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
495 | def test_insert_tag_A(self, connect, collection): |