| @@ 258-269 (lines=12) @@ | ||
| 255 | logging.getLogger().info(info_after["partitions"]) |
|
| 256 | assert info["partitions"][1]["segments"][0]["data_size"] >= info_after["partitions"][1]["segments"][0]["data_size"] |
|
| 257 | ||
| 258 | @pytest.fixture( |
|
| 259 | scope="function", |
|
| 260 | params=gen_simple_index() |
|
| 261 | ) |
|
| 262 | def get_simple_index(self, request, connect): |
|
| 263 | if str(connect._cmd("mode")) == "GPU": |
|
| 264 | if not request.param["index_type"] not in ivf(): |
|
| 265 | pytest.skip("Only support index_type: idmap/ivf") |
|
| 266 | if str(connect._cmd("mode")) == "CPU": |
|
| 267 | if request.param["index_type"] in index_cpu_not_support(): |
|
| 268 | pytest.skip("CPU not support index_type: ivf_sq8h") |
|
| 269 | return request.param |
|
| 270 | ||
| 271 | @pytest.mark.level(2) |
|
| 272 | def test_compact_after_index_created(self, connect, collection, get_simple_index): |
|
| @@ 29-40 (lines=12) @@ | ||
| 26 | ****************************************************************** |
|
| 27 | """ |
|
| 28 | ||
| 29 | @pytest.fixture( |
|
| 30 | scope="function", |
|
| 31 | params=gen_simple_index() |
|
| 32 | ) |
|
| 33 | def get_simple_index(self, request, connect): |
|
| 34 | if str(connect._cmd("mode")) == "GPU": |
|
| 35 | if not request.param["index_type"] not in ivf(): |
|
| 36 | pytest.skip("Only support index_type: idmap/ivf") |
|
| 37 | if str(connect._cmd("mode")) == "CPU": |
|
| 38 | if request.param["index_type"] in index_cpu_not_support(): |
|
| 39 | pytest.skip("CPU not support index_type: ivf_sq8h") |
|
| 40 | return request.param |
|
| 41 | ||
| 42 | @pytest.fixture( |
|
| 43 | scope="function", |
|