This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 2d17e6ed522 [ut](filecache) fix try_any_cast error in UTs (#40039)
2d17e6ed522 is described below
commit 2d17e6ed52277fdc6ad2701a13ac017b0434dd34
Author: zhengyu <[email protected]>
AuthorDate: Wed Aug 28 21:21:41 2024 +0800
[ut](filecache) fix try_any_cast error in UTs (#40039)
## Proposed changes
Issue Number: close #xxx
<!--Describe your changes.-->
---------
Signed-off-by: freemandealer <[email protected]>
---
be/test/io/fs/s3_file_writer_test.cpp | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/be/test/io/fs/s3_file_writer_test.cpp
b/be/test/io/fs/s3_file_writer_test.cpp
index 782ef80121a..ab76fb54347 100644
--- a/be/test/io/fs/s3_file_writer_test.cpp
+++ b/be/test/io/fs/s3_file_writer_test.cpp
@@ -944,10 +944,9 @@ TEST_F(S3FileWriterTest, multi_part_complete_error_2) {
sp->set_call_back("S3FileWriter::_complete:2", [](auto&& outcome) {
// Deliberately make one upload one part task fail to test if s3 file
writer could
// handle io error
- auto* parts =
try_any_cast<std::vector<std::unique_ptr<Aws::S3::Model::CompletedPart>>*>(
- outcome.back());
+ auto* parts =
try_any_cast<std::vector<io::ObjectCompleteMultiPart>*>(outcome.back());
size_t size = parts->size();
- parts->back()->SetPartNumber(size + 2);
+ parts->back().part_num = (size + 2);
});
Defer defer {[&]() { sp->clear_call_back("S3FileWriter::_complete:2"); }};
auto client = s3_fs->client_holder();
@@ -992,8 +991,8 @@ TEST_F(S3FileWriterTest, multi_part_complete_error_1) {
sp->set_call_back("S3FileWriter::_complete:1", [](auto&& outcome) {
// Deliberately make one upload one part task fail to test if s3 file
writer could
// handle io error
- const auto& points = try_any_cast<const std::pair<
- std::atomic_bool*,
std::vector<std::unique_ptr<Aws::S3::Model::CompletedPart>>*>&>(
+ const auto& points = try_any_cast<
+ const std::pair<std::atomic_bool*,
std::vector<io::ObjectCompleteMultiPart>*>&>(
outcome.back());
(*points.first) = false;
points.second->pop_back();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]