@@ 95-111 (lines=17) @@ | ||
92 | status, res = connect.count_entities(collection) |
|
93 | assert res == nb |
|
94 | ||
95 | def test_collection_rows_count_multi_partitions_B(self, connect, collection, insert_nb): |
|
96 | ''' |
|
97 | target: test collection rows_count is correct or not |
|
98 | method: create collection, create partitions and add vectors in one of the partitions, |
|
99 | assert the value returned by count_entities method is equal to length of vectors |
|
100 | expected: the count is equal to the length of vectors |
|
101 | ''' |
|
102 | new_tag = "new_tag" |
|
103 | nb = insert_nb |
|
104 | vectors = gen_vectors(nb, dim) |
|
105 | status = connect.create_partition(collection, tag) |
|
106 | status = connect.create_partition(collection, new_tag) |
|
107 | assert status.OK() |
|
108 | res = connect.insert(collection_name=collection, records=vectors, partition_tag=tag) |
|
109 | connect.flush([collection]) |
|
110 | status, res = connect.count_entities(collection) |
|
111 | assert res == nb |
|
112 | ||
113 | def test_collection_rows_count_multi_partitions_C(self, connect, collection, insert_nb): |
|
114 | ''' |
|
@@ 77-93 (lines=17) @@ | ||
74 | status, res = connect.count_entities(collection) |
|
75 | assert res == nb |
|
76 | ||
77 | def test_collection_rows_count_multi_partitions_A(self, connect, collection, insert_nb): |
|
78 | ''' |
|
79 | target: test collection rows_count is correct or not |
|
80 | method: create collection, create partitions and add vectors in it, |
|
81 | assert the value returned by count_entities method is equal to length of vectors |
|
82 | expected: the count is equal to the length of vectors |
|
83 | ''' |
|
84 | new_tag = "new_tag" |
|
85 | nb = insert_nb |
|
86 | vectors = gen_vectors(nb, dim) |
|
87 | status = connect.create_partition(collection, tag) |
|
88 | status = connect.create_partition(collection, new_tag) |
|
89 | assert status.OK() |
|
90 | res = connect.insert(collection_name=collection, records=vectors) |
|
91 | connect.flush([collection]) |
|
92 | status, res = connect.count_entities(collection) |
|
93 | assert res == nb |
|
94 | ||
95 | def test_collection_rows_count_multi_partitions_B(self, connect, collection, insert_nb): |
|
96 | ''' |