@@ -127,7 +127,7 @@ class PrefetchFileBatchReaderImplTest : public ::testing::Test,
127127 data_type_ = arrow::struct_ (fields_);
128128 mock_fs_ = std::make_shared<MockFileSystem>();
129129 local_fs_ = std::make_shared<LocalFileSystem>();
130- executor_ = CreateDefaultExecutor (/* thread_count=*/ 2 );
130+ ASSERT_OK_AND_ASSIGN ( executor_, CreateDefaultExecutor (/* thread_count=*/ 2 ) );
131131 dir_ = ::paimon::test::UniqueTestDirectory::Create ();
132132 ASSERT_TRUE (dir_);
133133 }
@@ -198,14 +198,16 @@ class PrefetchFileBatchReaderImplTest : public ::testing::Test,
198198 EXPECT_OK_AND_ASSIGN (std::unique_ptr<FileFormat> file_format,
199199 FileFormatFactory::Get (file_format_str, {}));
200200 EXPECT_OK_AND_ASSIGN (auto reader_builder, file_format->CreateReaderBuilder (batch_size));
201+ EXPECT_OK_AND_ASSIGN (std::shared_ptr<Executor> executor,
202+ CreateDefaultExecutor (prefetch_max_parallel_num - 1 ));
201203 EXPECT_OK_AND_ASSIGN (
202204 std::unique_ptr<PrefetchFileBatchReaderImpl> reader,
203205 PrefetchFileBatchReaderImpl::Create (
204206 PathUtil::JoinPath (dir_->Str (), " file." + file_format->Identifier ()),
205207 reader_builder.get (), local_fs_, prefetch_max_parallel_num, batch_size,
206208 prefetch_max_parallel_num * 2 , /* enable_adaptive_prefetch_strategy=*/ false ,
207- CreateDefaultExecutor (prefetch_max_parallel_num - 1 ),
208- /* initialize_read_ranges= */ false , cache_mode, CacheConfig (), GetDefaultPool ()));
209+ executor, /* initialize_read_ranges= */ false , cache_mode, CacheConfig ( ),
210+ GetDefaultPool ()));
209211 std::unique_ptr<ArrowSchema> c_schema = std::make_unique<ArrowSchema>();
210212 auto arrow_status = arrow::ExportSchema (*read_schema, c_schema.get ());
211213 EXPECT_TRUE (arrow_status.ok ());
0 commit comments