mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 18:25:44 +00:00
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:
@@ -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
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user