fix: update unit tests for thread pool size limit removal

Update test assertions to match the new behavior after removing
the hard-coded thread pool size limit of 16:
- ThreadPoolTest.ResizeAboveMaximum: no upper limit clamping
- TestComponentParam: default parallelism factor changed from 1 to 20

Signed-off-by: sijie-ni-0214 <sijie.ni@zilliz.com>
This commit is contained in:
sijie-ni-0214
2026-02-28 11:55:04 +08:00
parent c218c4f5ef
commit a41d170c14
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -62,15 +62,15 @@ TEST_F(ThreadPoolTest, ResizeBelowMinimum) {
TEST_F(ThreadPoolTest, ResizeAboveMaximum) {
ThreadPool pool(1.0, "test_pool");
// Resize to values above maximum (should be clamped to 16)
// Resize to large values (no upper limit, should be accepted as-is)
pool.Resize(17);
EXPECT_EQ(pool.GetMaxThreadNum(), 16);
EXPECT_EQ(pool.GetMaxThreadNum(), 17);
pool.Resize(100);
EXPECT_EQ(pool.GetMaxThreadNum(), 16);
EXPECT_EQ(pool.GetMaxThreadNum(), 100);
pool.Resize(1000);
EXPECT_EQ(pool.GetMaxThreadNum(), 16);
EXPECT_EQ(pool.GetMaxThreadNum(), 1000);
}
} // namespace milvus
+1 -1
View File
@@ -412,7 +412,7 @@ func TestComponentParam(t *testing.T) {
assert.Equal(t, 1, Params.BalanceChannelBatchSize.GetAsInt())
assert.Equal(t, true, Params.EnableBalanceOnMultipleCollections.GetAsBool())
assert.Equal(t, 1, Params.QueryNodeTaskParallelismFactor.GetAsInt())
assert.Equal(t, 20, Params.QueryNodeTaskParallelismFactor.GetAsInt())
params.Save("queryCoord.queryNodeTaskParallelismFactor", "2")
assert.Equal(t, 2, Params.QueryNodeTaskParallelismFactor.GetAsInt())