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

spmallette pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tinkerpop.git

commit 74cfcbdccdac4f7edbfb601842bd3a52869769e2
Author: Stephen Mallette <[email protected]>
AuthorDate: Wed Mar 25 20:26:17 2026 +0000

    Fix Docker health check requests for GLV integration tests
    
    The health checks in the GLV docker-compose files were sending malformed
    HTTP requests to Gremlin Server which lacked the Content-Type header.
    This caused the server to mishandle the requests leading to "Connection
    reset by peer" errors that could interfere with concurrent test
    execution, producing intermittent NullPointerException failures in
    random integration tests.
    
    Installed curl in the test server Docker image at build time so that
    health checks no longer need to run "apk add curl" on every invocation.
    Updated all four GLV docker-compose health checks (dotnet, go,
    javascript, python) to send properly formed JSON requests with the
    correct Content-Type header. Also fixed the Python health check which
    had an unquoted JSON body and an invalid traversal source reference. CTR
---
 docker/gremlin-test-server/Dockerfile            | 2 +-
 gremlin-dotnet/docker-compose.yml                | 2 +-
 gremlin-go/docker-compose.yml                    | 2 +-
 gremlin-js/gremlin-javascript/docker-compose.yml | 2 +-
 gremlin-python/docker-compose.yml                | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/docker/gremlin-test-server/Dockerfile 
b/docker/gremlin-test-server/Dockerfile
index 6802dcaaff..8ac853c1d1 100644
--- a/docker/gremlin-test-server/Dockerfile
+++ b/docker/gremlin-test-server/Dockerfile
@@ -29,7 +29,7 @@ RUN chmod 755 /opt/docker-entrypoint.sh
 
 # Installing dos2unix to avoid errors in running the entrypoint script on 
Windows machines where their
 # carriage return is \r\n instead of the \n needed for linux/unix containers
-RUN apk update && apk add dos2unix
+RUN apk update && apk add dos2unix curl
 RUN dos2unix /opt/docker-entrypoint.sh 
/opt/gremlin-server/bin/gremlin-server.sh && apk del dos2unix
 
 ARG GREMLIN_SERVER
diff --git a/gremlin-dotnet/docker-compose.yml 
b/gremlin-dotnet/docker-compose.yml
index a32dae8f30..a5d5b89c47 100644
--- a/gremlin-dotnet/docker-compose.yml
+++ b/gremlin-dotnet/docker-compose.yml
@@ -35,7 +35,7 @@ services:
       - ${HOME}/.m2:/root/.m2
       - ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test
     healthcheck:
-      test: [ "CMD-SHELL", "apk add curl && curl -X POST -d 
'{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
+      test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: 
application/json' -d '{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
       interval: 30s
       timeout: 10s
       retries: 30
diff --git a/gremlin-go/docker-compose.yml b/gremlin-go/docker-compose.yml
index 1e9de54b0d..37206156dd 100644
--- a/gremlin-go/docker-compose.yml
+++ b/gremlin-go/docker-compose.yml
@@ -35,7 +35,7 @@ services:
       - ${HOME}/.m2:/root/.m2
       - ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test
     healthcheck:
-      test: [ "CMD-SHELL", "apk add curl && curl -X POST -d 
'{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
+      test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: 
application/json' -d '{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
       interval: 30s
       timeout: 10s
       retries: 30
diff --git a/gremlin-js/gremlin-javascript/docker-compose.yml 
b/gremlin-js/gremlin-javascript/docker-compose.yml
index 3573034e53..f7465a4ca2 100644
--- a/gremlin-js/gremlin-javascript/docker-compose.yml
+++ b/gremlin-js/gremlin-javascript/docker-compose.yml
@@ -35,7 +35,7 @@ services:
       - ${HOME}/.m2:/root/.m2
       - ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test
     healthcheck:
-      test: [ "CMD-SHELL", "apk add curl && curl -X POST -d 
'{\"gremlin\":\"g.inject(0)\"}' http://localhost:45940"; ]
+      test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: 
application/json' -d '{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
       interval: 30s
       timeout: 10s
       retries: 30
diff --git a/gremlin-python/docker-compose.yml 
b/gremlin-python/docker-compose.yml
index 2e9261f0cc..0c78152e81 100644
--- a/gremlin-python/docker-compose.yml
+++ b/gremlin-python/docker-compose.yml
@@ -35,7 +35,7 @@ services:
       - ${HOME}/.m2:/root/.m2
       - ${ABS_PROJECT_HOME}/gremlin-test/target:/opt/gremlin-test
     healthcheck:
-      test: [ "CMD-SHELL", "apk add curl && curl -X POST -d 
{\"gremlin\":\"gremlin.inject(1)\"} http://localhost:45940"; ]
+      test: [ "CMD-SHELL", "curl -sf -X POST -H 'Content-Type: 
application/json' -d '{\"gremlin\":\"g.inject(1)\"}' http://localhost:45940"; ]
       interval: 30s
       timeout: 10s
       retries: 30

Reply via email to