This is an automated email from the ASF dual-hosted git repository.
Xuanwo pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/opendal.git
The following commit(s) were added to refs/heads/main by this push:
new 25f3a0ad10 fix(bindings/cpp): resolve service selectors and fail
behavior tests on setup errors (#9403)
25f3a0ad10 is described below
commit 25f3a0ad1020972ffa3ec633720914d0050e1414
Author: Xuanwo <[email protected]>
AuthorDate: Mon Nov 30 04:40:04 2026 +0800
fix(bindings/cpp): resolve service selectors and fail behavior tests on
setup errors (#9403)
fix(bindings/cpp): run behavior tests for the configured HDFS Native service
---
bindings/cpp/tests/framework/test_framework.hpp | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/bindings/cpp/tests/framework/test_framework.hpp
b/bindings/cpp/tests/framework/test_framework.hpp
index 0d8089a1f6..9a4e86aaba 100644
--- a/bindings/cpp/tests/framework/test_framework.hpp
+++ b/bindings/cpp/tests/framework/test_framework.hpp
@@ -72,7 +72,9 @@ public:
}
// Read configuration from environment variables
+ std::replace(service_name_.begin(), service_name_.end(), '_', '-');
std::string prefix = "opendal_" + service_name_ + "_";
+ std::replace(prefix.begin(), prefix.end(), '-', '_');
std::transform(prefix.begin(), prefix.end(), prefix.begin(),
::tolower);
#ifdef _WIN32
@@ -233,7 +235,7 @@ protected:
ASSERT_TRUE(op_.Available()) << "Operator not available for
service: " << config.service_name();
capability_ = op_.Info();
} catch (const std::exception& e) {
- GTEST_SKIP() << "Failed to create operator: " << e.what();
+ FAIL() << "Failed to create operator: " << e.what();
}
}
@@ -289,7 +291,7 @@ protected:
try {
op_ = opendal::async::Operator(config.service_name(),
config.config());
} catch (const std::exception& e) {
- GTEST_SKIP() << "Failed to create async operator: " << e.what();
+ FAIL() << "Failed to create async operator: " << e.what();
}
}