You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by ga...@apache.org on 2026/08/25 13:13:31 UTC

(iceberg-cpp) branch main updated: test(io): stop probing the EC2 metadata service in S3 tests (#897)

This is an automated email from the ASF dual-hosted git repository.

wgtmac pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/iceberg-cpp.git


The following commit(s) were added to refs/heads/main by this push:
     new 8959a140 test(io): stop probing the EC2 metadata service in S3 tests (#897)
8959a140 is described below

commit 8959a1400a2ed10aaae527a3e62f7a747fbcd1f4
Author: Jiajia Li <pl...@alibaba-inc.com>
AuthorDate: Tue Aug 25 21:13:25 2026 +0800

    test(io): stop probing the EC2 metadata service in S3 tests (#897)
---
 src/iceberg/test/arrow_s3_file_io_test.cc | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/iceberg/test/arrow_s3_file_io_test.cc b/src/iceberg/test/arrow_s3_file_io_test.cc
index 40719827..e369fd0c 100644
--- a/src/iceberg/test/arrow_s3_file_io_test.cc
+++ b/src/iceberg/test/arrow_s3_file_io_test.cc
@@ -104,6 +104,15 @@ class ArrowS3FileIOTest : public ::testing::Test {
  protected:
 #if ICEBERG_S3_ENABLED
   static void SetUpTestSuite() {
+    // Off EC2 every S3 client build waits for this to time out. Not overwritten,
+    // so a run that does want those credentials can still ask.
+#  ifdef _WIN32
+    if (std::getenv("AWS_EC2_METADATA_DISABLED") == nullptr) {
+      _putenv_s("AWS_EC2_METADATA_DISABLED", "true");
+    }
+#  else
+    ::setenv("AWS_EC2_METADATA_DISABLED", "true", /*overwrite=*/0);
+#  endif
     auto io = MakeS3FileIO({});
     ASSERT_THAT(io, IsOk());
   }