Skip to content

Commit 02c9b3c

Browse files
committed
Remove the resume_policy change
1 parent 5725fbc commit 02c9b3c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

google/cloud/storage/async/resume_policy.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class LimitedErrorCountResumePolicyImpl : public ResumePolicy {
3535
}
3636
Action OnFinish(Status const& s) override {
3737
if (!s.ok()) ++error_count_;
38-
return error_count_ >= maximum_resumes_ ? kStop : kContinue;
38+
return error_count_ > maximum_resumes_ ? kStop : kContinue;
3939
}
4040

4141
private:

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1249,7 +1249,9 @@ TEST(ObjectDescriptorImpl, ReadWithSubsequentStream) {
12491249
});
12501250
});
12511251
EXPECT_CALL(*stream1, Finish).WillOnce([&]() {
1252-
return sequencer.PushBack("Finish[1]").then([](auto) { return Status{}; });
1252+
return sequencer.PushBack("Finish[1]").then([](auto) {
1253+
return PermanentError();
1254+
});
12531255
});
12541256
EXPECT_CALL(*stream1, Cancel).Times(1);
12551257

0 commit comments

Comments
 (0)