@@ -807,12 +807,9 @@ TEST_F(IndexFileWriterTest, WriteV2OutputTest) {
807807 EXPECT_CALL (
808808 *(IndexStorageFormatV2MockCreateOutputStream*)writer_mock._index_storage_format .get (),
809809 create_output_stream ())
810- .WillOnce (::testing::Invoke (
811- [&]() -> std::pair<std::unique_ptr<lucene::store::Directory, DirectoryDeleter>,
812- std::unique_ptr<lucene::store::IndexOutput>> {
813- return std::make_pair (std::move (out_dir_ptr),
814- std::move (compound_file_output));
815- }));
810+ .WillOnce (::testing::Invoke ([&]() -> std::unique_ptr<lucene::store::IndexOutput> {
811+ return std::move (compound_file_output);
812+ }));
816813
817814 int64_t index_id = 1 ;
818815 std::string index_suffix = " suffix1" ;
@@ -870,12 +867,9 @@ TEST_F(IndexFileWriterTest, WriteV2OutputCloseErrorTest) {
870867 EXPECT_CALL (
871868 *(IndexStorageFormatV2MockCreateOutputStream*)writer_mock._index_storage_format .get (),
872869 create_output_stream ())
873- .WillOnce (::testing::Invoke (
874- [&]() -> std::pair<std::unique_ptr<lucene::store::Directory, DirectoryDeleter>,
875- std::unique_ptr<lucene::store::IndexOutput>> {
876- return std::make_pair (std::move (out_dir_ptr),
877- std::move (compound_file_output));
878- }));
870+ .WillOnce (::testing::Invoke ([&]() -> std::unique_ptr<lucene::store::IndexOutput> {
871+ return std::move (compound_file_output);
872+ }));
879873
880874 int64_t index_id = 1 ;
881875 std::string index_suffix = " suffix1" ;
0 commit comments