Skip to content

Commit b35c0ae

Browse files
committed
Rebase with main branch
1 parent 754244a commit b35c0ae

4 files changed

Lines changed: 21 additions & 30 deletions

File tree

google/cloud/storage/internal/async/default_options_test.cc

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,15 +97,12 @@ TEST(DefaultOptionsAsync, MaximumRangeSizeOption) {
9797

9898
TEST(DefaultOptionsAsync, EnableMultiStreamOptimizationOption) {
9999
auto const options = DefaultOptionsAsync({});
100-
EXPECT_TRUE(
101-
options.get<storage_experimental::EnableMultiStreamOptimizationOption>());
100+
EXPECT_TRUE(options.get<storage::EnableMultiStreamOptimizationOption>());
102101

103102
auto const updated_options = DefaultOptionsAsync(
104-
Options{}.set<storage_experimental::EnableMultiStreamOptimizationOption>(
105-
false));
103+
Options{}.set<storage::EnableMultiStreamOptimizationOption>(false));
106104
EXPECT_FALSE(
107-
updated_options
108-
.get<storage_experimental::EnableMultiStreamOptimizationOption>());
105+
updated_options.get<storage::EnableMultiStreamOptimizationOption>());
109106
}
110107

111108
} // namespace

google/cloud/storage/internal/async/object_descriptor_impl.cc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,7 @@ void ObjectDescriptorImpl::Start(
5656
OnRead(it, std::move(first_response));
5757
// Acquire lock and queue the background stream if multi-stream optimization
5858
// is enabled.
59-
if (options_
60-
.get<storage_experimental::EnableMultiStreamOptimizationOption>()) {
59+
if (options_.get<storage::EnableMultiStreamOptimizationOption>()) {
6160
lk.lock();
6261
AssurePendingStreamQueued(lk);
6362
}
@@ -86,8 +85,7 @@ void ObjectDescriptorImpl::AssurePendingStreamQueued(
8685
}
8786

8887
void ObjectDescriptorImpl::MakeSubsequentStream() {
89-
if (!options_
90-
.get<storage_experimental::EnableMultiStreamOptimizationOption>()) {
88+
if (!options_.get<storage::EnableMultiStreamOptimizationOption>()) {
9189
// Do nothing if multi-stream optimization is disabled.
9290
return;
9391
}

google/cloud/storage/internal/async/object_descriptor_impl_test.cc

Lines changed: 15 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,12 @@ auto constexpr kMetadataText = R"pb(
6767

6868
auto NoResume() { return storage::LimitedErrorCountResumePolicy(0)(); }
6969

70-
auto MakeTested(
71-
std::unique_ptr<storage_experimental::ResumePolicy> resume_policy,
72-
OpenStreamFactory make_stream,
73-
google::storage::v2::BidiReadObjectSpec read_object_spec,
74-
std::shared_ptr<OpenStream> stream) {
70+
auto MakeTested(std::unique_ptr<storage::ResumePolicy> resume_policy,
71+
OpenStreamFactory make_stream,
72+
google::storage::v2::BidiReadObjectSpec read_object_spec,
73+
std::shared_ptr<OpenStream> stream) {
7574
Options options;
76-
options.set<storage_experimental::EnableMultiStreamOptimizationOption>(true);
75+
options.set<storage::EnableMultiStreamOptimizationOption>(true);
7776
return std::make_shared<ObjectDescriptorImpl>(
7877
std::move(resume_policy), std::move(make_stream),
7978
std::move(read_object_spec), std::move(stream), std::move(options));
@@ -792,10 +791,9 @@ TEST(ObjectDescriptorImpl, ResumeRangesOnRecoverableError) {
792791

793792
auto spec = google::storage::v2::BidiReadObjectSpec{};
794793
ASSERT_TRUE(TextFormat::ParseFromString(kReadSpecText, &spec));
795-
auto tested =
796-
MakeTested(storage::LimitedErrorCountResumePolicy(1)(),
797-
factory.AsStdFunction(), spec,
798-
std::make_shared<OpenStream>(InitialStream(sequencer)));
794+
auto tested = MakeTested(
795+
storage::LimitedErrorCountResumePolicy(1)(), factory.AsStdFunction(),
796+
spec, std::make_shared<OpenStream>(InitialStream(sequencer)));
799797
auto response = Response{};
800798
EXPECT_TRUE(TextFormat::ParseFromString(kResponse0, &response));
801799
tested->Start(std::move(response));
@@ -1071,10 +1069,9 @@ TEST(ObjectDescriptorImpl, ResumeUsesRouting) {
10711069

10721070
auto spec = google::storage::v2::BidiReadObjectSpec{};
10731071
ASSERT_TRUE(TextFormat::ParseFromString(kReadSpecText, &spec));
1074-
auto tested =
1075-
MakeTested(storage::LimitedErrorCountResumePolicy(1)(),
1076-
factory.AsStdFunction(), spec,
1077-
std::make_shared<OpenStream>(initial_stream()));
1072+
auto tested = MakeTested(storage::LimitedErrorCountResumePolicy(1)(),
1073+
factory.AsStdFunction(), spec,
1074+
std::make_shared<OpenStream>(initial_stream()));
10781075
auto response = Response{};
10791076
EXPECT_TRUE(TextFormat::ParseFromString(kResponse0, &response));
10801077
tested->Start(std::move(response));
@@ -1653,10 +1650,10 @@ TEST(ObjectDescriptorImpl, OnResumeSuccessful) {
16531650
});
16541651
});
16551652

1656-
auto tested = MakeTested(
1657-
storage::LimitedErrorCountResumePolicy(1)(),
1658-
factory.AsStdFunction(), google::storage::v2::BidiReadObjectSpec{},
1659-
std::make_shared<OpenStream>(std::move(stream1)));
1653+
auto tested = MakeTested(storage::LimitedErrorCountResumePolicy(1)(),
1654+
factory.AsStdFunction(),
1655+
google::storage::v2::BidiReadObjectSpec{},
1656+
std::make_shared<OpenStream>(std::move(stream1)));
16601657

16611658
tested->Start(Response{});
16621659
expect_startup_events(sequencer);

google/cloud/storage/internal/async/writer_connection_resumed_test.cc

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,7 @@ TEST(WriterConnectionResumed, OnQueryUpdatesWriteHandle) {
590590
ASSERT_TRUE(current_handle.has_value());
591591
EXPECT_EQ(current_handle->handle(), "initial-handle");
592592

593-
auto flush =
594-
connection->Flush(storage_experimental::WritePayload(expected_payload));
593+
auto flush = connection->Flush(storage::WritePayload(expected_payload));
595594

596595
auto next = sequencer.PopFrontWithName();
597596
EXPECT_EQ(next.second, "Flush");

0 commit comments

Comments
 (0)