MCPcopy Create free account
hub / github.com/apache/arrow / AssertMetadataRoundtrip

Function AssertMetadataRoundtrip

cpp/src/arrow/filesystem/s3fs_test.cc:736–745  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

734
735 template <typename Matcher>
736 void AssertMetadataRoundtrip(const std::string& path,
737 const std::shared_ptr<const KeyValueMetadata>& metadata,
738 Matcher&& matcher) {
739 ASSERT_OK_AND_ASSIGN(auto output, fs_->OpenOutputStream(path, metadata));
740 ASSERT_OK(output->Close());
741 ASSERT_OK_AND_ASSIGN(auto input, fs_->OpenInputStream(path));
742 ASSERT_OK_AND_ASSIGN(auto got_metadata, input->ReadMetadata());
743 ASSERT_NE(got_metadata, nullptr);
744 ASSERT_THAT(got_metadata->sorted_pairs(), matcher);
745 }
746
747 void AssertInfoAllBucketsRecursive(const std::vector<FileInfo>& infos) {
748 AssertFileInfo(infos[0], "bucket", FileType::Directory);

Callers 1

TEST_FFunction · 0.85

Calls 2

sorted_pairsMethod · 0.80
CloseMethod · 0.45

Tested by

no test coverage detected