@@ 1195-1206 (lines=12) @@ | ||
1192 | logging.getLogger().info(ids) |
|
1193 | assert not status.OK() |
|
1194 | ||
1195 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
1196 | def test_insert_ids_length_not_match(self, connect, ip_collection): |
|
1197 | ''' |
|
1198 | target: test add vectors in collection, use customize ids, len(ids) != len(vectors) |
|
1199 | method: create collection and add vectors in it |
|
1200 | expected: raise an exception |
|
1201 | ''' |
|
1202 | nq = 5 |
|
1203 | vectors = gen_vectors(nq, dim) |
|
1204 | ids = [i for i in range(1, nq)] |
|
1205 | with pytest.raises(Exception) as e: |
|
1206 | status, ids = connect.insert(ip_collection, vectors, ids) |
|
1207 | ||
1208 | @pytest.fixture( |
|
1209 | scope="function", |
|
@@ 433-444 (lines=12) @@ | ||
430 | logging.getLogger().info(ids) |
|
431 | assert not status.OK() |
|
432 | ||
433 | @pytest.mark.timeout(ADD_TIMEOUT) |
|
434 | def test_insert_ids_length_not_match(self, connect, collection): |
|
435 | ''' |
|
436 | target: test add vectors in collection, use customize ids, len(ids) != len(vectors) |
|
437 | method: create collection and add vectors in it |
|
438 | expected: raise an exception |
|
439 | ''' |
|
440 | nq = 5 |
|
441 | vectors = gen_vectors(nq, dim) |
|
442 | ids = [i for i in range(1, nq)] |
|
443 | with pytest.raises(Exception) as e: |
|
444 | status, ids = connect.insert(collection, vectors, ids) |
|
445 | ||
446 | @pytest.fixture( |
|
447 | scope="function", |