You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by mb...@apache.org on 2026/09/15 16:21:47 UTC

(asterixdb) branch master updated: [NO ISSUE][TEST] Set S3 mock port in unstable test

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

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/asterixdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 660b5c2629 [NO ISSUE][TEST] Set S3 mock port in unstable test
660b5c2629 is described below

commit 660b5c2629d3219b240dc0245e47a2b178df1c88
Author: Hussain Towaileb <Hu...@Couchbase.com>
AuthorDate: Mon Sep 14 19:08:41 2026 +0300

    [NO ISSUE][TEST] Set S3 mock port in unstable test
    
    CloudStorageUnstableTest starts the S3 mock in a testcontainer on a
    random published port but never publishes that port through the
    s3mockEndpoint system property, so the %template% placeholder in
    external collection DDL falls back to the fixed default endpoint on port
    8001, where nothing listens. Whenever the random 10% selection picks the
    storage-size external-collection case, CREATE EXTERNAL DATASET fails
    with connection refused. Set the property the same way CloudStorageTest
    does.
    
    Co-Authored-By: Claude Fable 5.1 <no...@anthropic.com>
    Change-Id: Ie4ec9c45a58237da989a6ddea2d526ed682b3775
    Reviewed-on: https://asterix-gerrit.ics.uci.edu/c/asterixdb/+/21788
    Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
    Reviewed-by: Michael Blow <mb...@apache.org>
    Tested-by: Michael Blow <mb...@apache.org>
---
 .../apache/asterix/test/cloud_storage/CloudStorageUnstableTest.java  | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/cloud_storage/CloudStorageUnstableTest.java b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/cloud_storage/CloudStorageUnstableTest.java
index cfa5672945..3b4657c5cb 100644
--- a/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/cloud_storage/CloudStorageUnstableTest.java
+++ b/asterixdb/asterix-app/src/test/java/org/apache/asterix/test/cloud_storage/CloudStorageUnstableTest.java
@@ -30,6 +30,7 @@ import java.util.Random;
 
 import org.apache.asterix.api.common.LocalCloudUtilAdobeMock;
 import org.apache.asterix.common.config.GlobalConfig;
+import org.apache.asterix.test.common.TestConstants;
 import org.apache.asterix.test.common.TestExecutor;
 import org.apache.asterix.test.runtime.LangExecutionUtil;
 import org.apache.asterix.testframework.context.TestCaseContext;
@@ -79,6 +80,10 @@ public class CloudStorageUnstableTest {
         S3MockContainer s3Mock = LocalCloudUtilAdobeMock.startS3CloudEnvironment(true, true);
         fillConfigTemplate(MOCK_SERVER_HOSTNAME_FRAGMENT + s3Mock.getHttpServerPort(), CONFIG_FILE_TEMPLATE,
                 CONFIG_FILE_NAME);
+        // the mock listens on a random published port; without this the %template% placeholder falls back to the
+        // fixed default endpoint (port 8001), where nothing is listening
+        System.setProperty(TestConstants.S3_SERVICE_ENDPOINT_KEY,
+                MOCK_SERVER_HOSTNAME_FRAGMENT + s3Mock.getHttpServerPort());
         TestExecutor testExecutor = new TestExecutor(DELTA_RESULT_PATH);
         testExecutor.executorId = "cloud";
         testExecutor.stripSubstring = "//DB:";