From 197e03313b327517b1da73797efc48afe13134de Mon Sep 17 00:00:00 2001 From: Stephen Mallette Date: Fri, 29 May 2026 10:23:45 -0400 Subject: [PATCH 1/3] fix: ensure docker compose down always runs after GLV integration tests When docker compose up exits non-zero (test failure or interrupted build), Maven aborts the integration-test phase and the separate shutdown-container execution never runs, leaving behind stale Docker networks. Subsequent builds then fail with "address already in use" on the bound test ports. Merge up, down, and image-prune into a single bash -c script in all four GLV pom files (JS, Go, Python, .NET). The script captures the up exit code, always runs down and prune regardless of success or failure, then exits with the original code so Maven still marks the build correctly. Assisted-by: Claude Code:claude-sonnet-4-6 --- gremlin-dotnet/test/pom.xml | 43 ++------------------------ gremlin-go/pom.xml | 43 ++------------------------ gremlin-js/gremlin-javascript/pom.xml | 44 ++------------------------- gremlin-python/pom.xml | 15 ++------- 4 files changed, 12 insertions(+), 133 deletions(-) diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml index a546d7f8a1d..2f6c7d8a2c9 100644 --- a/gremlin-dotnet/test/pom.xml +++ b/gremlin-dotnet/test/pom.xml @@ -102,47 +102,10 @@ limitations under the License. ${user.home} - docker + bash - compose - up - --build - --exit-code-from - gremlin-dotnet-integration-tests - - - - - shutdown-container - integration-test - - exec - - - ${skipTests} - - docker - - compose - down - - - - - remove-dangling-images - integration-test - - exec - - - ${skipTests} - docker - - image - prune - --filter - label=maintainer=dev@tinkerpop.apache.org - -f + -c + docker compose up --build --exit-code-from gremlin-dotnet-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT diff --git a/gremlin-go/pom.xml b/gremlin-go/pom.xml index db0a0251e3c..765c3f53478 100644 --- a/gremlin-go/pom.xml +++ b/gremlin-go/pom.xml @@ -113,47 +113,10 @@ limitations under the License. ${user.home} - docker + bash - compose - up - --build - --exit-code-from - gremlin-go-integration-tests - - - - - shutdown-container - integration-test - - exec - - - ${skipTests} - - docker - - compose - down - - - - - remove-dangling-images - integration-test - - exec - - - ${skipTests} - docker - - image - prune - --filter - label=maintainer=dev@tinkerpop.apache.org - -f + -c + docker compose up --build --exit-code-from gremlin-go-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT diff --git a/gremlin-js/gremlin-javascript/pom.xml b/gremlin-js/gremlin-javascript/pom.xml index b5f1666f405..081cd6adb03 100644 --- a/gremlin-js/gremlin-javascript/pom.xml +++ b/gremlin-js/gremlin-javascript/pom.xml @@ -281,52 +281,14 @@ limitations under the License. ${host.uid} ${host.gid} - docker + bash - compose - up - --build - --exit-code-from - gremlin-js-integration-tests + -c + docker compose up --build --exit-code-from gremlin-js-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT . - - shutdown-container - integration-test - - exec - - - ${skipTests} - - docker - - compose - down - - . - - - - remove-dangling-images - integration-test - - exec - - - ${skipTests} - docker - - image - prune - --filter - label=maintainer=dev@tinkerpop.apache.org - -f - - - diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml index db8d3ebe232..e36d9d263f8 100644 --- a/gremlin-python/pom.xml +++ b/gremlin-python/pom.xml @@ -166,24 +166,15 @@ limitations under the License. ${skipTests} - + - - - - - - - - - - - + + From d33e7c3fae476aa4a149a0f216b6478f01375eeb Mon Sep 17 00:00:00 2001 From: Stephen Mallette Date: Fri, 29 May 2026 11:03:13 -0400 Subject: [PATCH 2/3] Regenerated tests after merge CTR --- .../test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs index 448457ee970..bf88cfccfaf 100644 --- a/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs +++ b/gremlin-dotnet/test/Gremlin.Net.IntegrationTest/Gherkin/Gremlin.cs @@ -946,9 +946,9 @@ private static IDictionary, ITraversal>> {(g,p) =>g.AddV().Property(Cardinality.Single, new Dictionary {{ "name", "foo" }, { "age", 42 }}), (g,p) =>g.V().Has("name", "foo")}}, {"g_V_hasXname_fooX_propertyXname_setXbarX_age_43X", new List, ITraversal>> {(g,p) =>g.AddV().Property(Cardinality.Single, "name", "foo").Property("age", 42), (g,p) =>g.V().Has("name", "foo").Property(new Dictionary {{ "name", CardinalityValue.Set("bar") }, { "age", 43 }}), (g,p) =>g.V().Has("name", "foo"), (g,p) =>g.V().Has("name", "bar"), (g,p) =>g.V().Has("age", 43), (g,p) =>g.V().Has("age", 42)}}, {"g_V_hasXname_fooX_propertyXset_name_bar_age_singleX43XX", new List, ITraversal>> {(g,p) =>g.AddV().Property(Cardinality.Single, "name", "foo").Property("age", 42), (g,p) =>g.V().Has("name", "foo").Property(Cardinality.Set, new Dictionary {{ "name", "bar" }, { "age", CardinalityValue.Single(43) }}), (g,p) =>g.V().Has("name", "foo"), (g,p) =>g.V().Has("name", "bar"), (g,p) =>g.V().Has("age", 43), (g,p) =>g.V().Has("age", 42)}}, - {"g_addV_propertyXnullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "person").Property((IDictionary) null), (g,p) =>g.V().HasLabel("person").Values()}}, + {"g_addV_propertyXnullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "person").Property(null), (g,p) =>g.V().HasLabel("person").Values()}}, {"g_addV_propertyXemptyX", new List, ITraversal>> {(g,p) =>g.AddV((string) "person").Property(new Dictionary {}), (g,p) =>g.V().HasLabel("person").Values()}}, - {"g_addV_propertyXset_nullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "foo").Property(Cardinality.Set, (IDictionary) null), (g,p) =>g.V().HasLabel("foo").Values()}}, + {"g_addV_propertyXset_nullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "foo").Property(Cardinality.Set, null), (g,p) =>g.V().HasLabel("foo").Values()}}, {"g_addV_propertyXset_emptyX", new List, ITraversal>> {(g,p) =>g.AddV((string) "foo").Property(Cardinality.Set, new Dictionary {}), (g,p) =>g.V().HasLabel("person").Values()}}, {"g_addVXpersonX_propertyXname_joshX_propertyXage_nullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "person").Property("name", "josh").Property("age", null), (g,p) =>g.V().Has("person", "age", (object) null)}}, {"g_addVXpersonX_propertyXname_markoX_propertyXfriendWeight_null_acl_nullX", new List, ITraversal>> {(g,p) =>g.AddV((string) "person").Property("name", "marko").Property("friendWeight", null, "acl", null), (g,p) =>g.V().Has("person", "name", "marko").Has("friendWeight", (object) null), (g,p) =>g.V().Has("person", "name", "marko").Properties("friendWeight").Has("acl", (object) null), (g,p) =>g.V().Has("person", "name", "marko").Properties("friendWeight").Count()}}, From ca1834d04d28e428b9157fe52025bcc3f59d404c Mon Sep 17 00:00:00 2001 From: Stephen Mallette Date: Fri, 29 May 2026 11:45:06 -0400 Subject: [PATCH 3/3] fix: pre-clean Docker compose state before each GLV test run Add 'docker compose down' as the first step of the bash script so any stale containers or networks left by a previously interrupted build are removed before trying to bind the test ports. This is idempotent when nothing is running and prevents the recurring "address already in use" error on ports 45940-45942 when a prior run was killed mid-flight. Assisted-by: Claude Code:claude-sonnet-4-6 --- gremlin-dotnet/test/pom.xml | 2 +- gremlin-go/pom.xml | 2 +- gremlin-js/gremlin-javascript/pom.xml | 2 +- gremlin-python/pom.xml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gremlin-dotnet/test/pom.xml b/gremlin-dotnet/test/pom.xml index 2f6c7d8a2c9..13ebf543e1c 100644 --- a/gremlin-dotnet/test/pom.xml +++ b/gremlin-dotnet/test/pom.xml @@ -105,7 +105,7 @@ limitations under the License. bash -c - docker compose up --build --exit-code-from gremlin-dotnet-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT + docker compose down; docker compose up --build --exit-code-from gremlin-dotnet-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT diff --git a/gremlin-go/pom.xml b/gremlin-go/pom.xml index 765c3f53478..41413b26d53 100644 --- a/gremlin-go/pom.xml +++ b/gremlin-go/pom.xml @@ -116,7 +116,7 @@ limitations under the License. bash -c - docker compose up --build --exit-code-from gremlin-go-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT + docker compose down; docker compose up --build --exit-code-from gremlin-go-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT diff --git a/gremlin-js/gremlin-javascript/pom.xml b/gremlin-js/gremlin-javascript/pom.xml index 081cd6adb03..fcbab8a41bf 100644 --- a/gremlin-js/gremlin-javascript/pom.xml +++ b/gremlin-js/gremlin-javascript/pom.xml @@ -284,7 +284,7 @@ limitations under the License. bash -c - docker compose up --build --exit-code-from gremlin-js-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT + docker compose down; docker compose up --build --exit-code-from gremlin-js-integration-tests; EXIT=$?; docker compose down; docker image prune --filter label=maintainer=dev@tinkerpop.apache.org -f; exit $EXIT . diff --git a/gremlin-python/pom.xml b/gremlin-python/pom.xml index e36d9d263f8..40d8ad819fc 100644 --- a/gremlin-python/pom.xml +++ b/gremlin-python/pom.xml @@ -174,7 +174,7 @@ limitations under the License. - +