From e5c26762fc4917e2ae6ec0b5df210f3309a5d1b7 Mon Sep 17 00:00:00 2001 From: alejovazquezsplit Date: Fri, 31 Jul 2026 15:01:20 -0300 Subject: [PATCH 1/4] Bump java-client-testing to 5.0.0-rc: unify tests() to return Map and decouple version from parent --- pom.xml | 2 +- testing/pom.xml | 4 ++-- .../split/client/testing/SplitClientForTest.java | 15 ++------------- .../client/testing/runner/RunWithSplits.java | 2 +- 4 files changed, 6 insertions(+), 17 deletions(-) diff --git a/pom.xml b/pom.xml index 271ba171..7713ddd0 100644 --- a/pom.xml +++ b/pom.xml @@ -66,9 +66,9 @@ pluggable-storage redis-wrapper - testing okhttp-modules client + testing diff --git a/testing/pom.xml b/testing/pom.xml index 21b54f2a..44eebf1e 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -9,14 +9,14 @@ java-client-testing jar - 4.18.3 + 5.0.0-rc Java Client For Testing Testing suite for Java SDK for Split io.split.client java-client - ${project.version} + ${project.parent.version} junit diff --git a/testing/src/main/java/io/split/client/testing/SplitClientForTest.java b/testing/src/main/java/io/split/client/testing/SplitClientForTest.java index 763d4df5..01020950 100644 --- a/testing/src/main/java/io/split/client/testing/SplitClientForTest.java +++ b/testing/src/main/java/io/split/client/testing/SplitClientForTest.java @@ -21,19 +21,8 @@ public SplitClientForTest() { _tests = new HashMap<>(); } - public Map tests() { - return _tests - .entrySet() - .stream() - .collect(toMap( - entry -> entry.getKey().split(), - entry -> entry.getValue().treatment(), - (existing, replacement) -> existing - )); - } - - public Map testMappings() { - return Collections.unmodifiableMap(_tests); + public Map tests() { + return _tests; } public void clearTreatments() { diff --git a/testing/src/main/java/io/split/client/testing/runner/RunWithSplits.java b/testing/src/main/java/io/split/client/testing/runner/RunWithSplits.java index 01c6d3ee..2ca5aa5f 100644 --- a/testing/src/main/java/io/split/client/testing/runner/RunWithSplits.java +++ b/testing/src/main/java/io/split/client/testing/runner/RunWithSplits.java @@ -26,7 +26,7 @@ public void evaluate() throws Throwable { SplitClientForTest splitClient = findFirstSplitClient(target, target.getClass()); // Preserve the Split state between Test runs - Map priorTests = new HashMap<>(splitClient.testMappings()); + Map priorTests = new HashMap<>(splitClient.tests()); // Apply the Active Scenario for this if (scenario != null) { From eb0ecefd723a093a0f64eb70a3d249868185831f Mon Sep 17 00:00:00 2001 From: alejovazquezsplit Date: Mon, 3 Aug 2026 11:32:57 -0300 Subject: [PATCH 2/4] Replace Guava ImmutableMap with Collections.singletonMap in tests to remove external dependency --- .../client/testing/SplitScenarioAnnotationTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/testing/src/test/java/io/split/client/testing/SplitScenarioAnnotationTest.java b/testing/src/test/java/io/split/client/testing/SplitScenarioAnnotationTest.java index f590d0c5..c6caa98e 100644 --- a/testing/src/test/java/io/split/client/testing/SplitScenarioAnnotationTest.java +++ b/testing/src/test/java/io/split/client/testing/SplitScenarioAnnotationTest.java @@ -1,6 +1,5 @@ package io.split.client.testing; -import com.google.common.collect.ImmutableMap; import io.split.client.api.Key; import io.split.client.api.SplitResult; import io.split.client.dtos.EvaluationOptions; @@ -15,6 +14,7 @@ import org.junit.runner.RunWith; import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.Objects; @@ -97,11 +97,11 @@ public void testDefaultScenario() { Assert.assertEquals(new SplitResult(ON_TREATMENT, null), splitClient.getTreatmentWithConfig(ARBITRARY_KEY, DEFAULT_CLIENT_FEATURE, new HashMap<>(), new EvaluationOptions(new HashMap<>()))); Assert.assertEquals(new SplitResult(ON_TREATMENT, null), splitClient.getTreatmentWithConfig(ARBITRARY_KEY, DEFAULT_CLIENT_FEATURE, new EvaluationOptions(new HashMap<>()))); Assert.assertEquals(new SplitResult(ON_TREATMENT, null), splitClient.getTreatmentWithConfig(new Key(ARBITRARY_KEY, ARBITRARY_KEY), DEFAULT_CLIENT_FEATURE, new HashMap<>(), new EvaluationOptions(new HashMap<>()))); - Assert.assertEquals(ImmutableMap.of(DEFAULT_CLIENT_FEATURE, ON_TREATMENT), splitClient.getTreatments(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new EvaluationOptions(new HashMap<>()))); - Assert.assertEquals(ImmutableMap.of(DEFAULT_CLIENT_FEATURE, ON_TREATMENT), splitClient.getTreatments(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new HashMap<>(), new EvaluationOptions(new HashMap<>()))); - Assert.assertEquals(ImmutableMap.of(DEFAULT_CLIENT_FEATURE, new SplitResult(ON_TREATMENT, null)), splitClient.getTreatmentsWithConfig(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new EvaluationOptions(new HashMap<>()))); + Assert.assertEquals(Collections.singletonMap(DEFAULT_CLIENT_FEATURE, ON_TREATMENT), splitClient.getTreatments(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new EvaluationOptions(new HashMap<>()))); + Assert.assertEquals(Collections.singletonMap(DEFAULT_CLIENT_FEATURE, ON_TREATMENT), splitClient.getTreatments(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new HashMap<>(), new EvaluationOptions(new HashMap<>()))); + Assert.assertEquals(Collections.singletonMap(DEFAULT_CLIENT_FEATURE, new SplitResult(ON_TREATMENT, null)), splitClient.getTreatmentsWithConfig(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new EvaluationOptions(new HashMap<>()))); Assert.assertEquals(new SplitResult(ON_TREATMENT, null), splitClient.getTreatmentsWithConfig(ARBITRARY_KEY, Arrays.asList(DEFAULT_CLIENT_FEATURE), new HashMap<>(), new EvaluationOptions(new HashMap<>())).get(DEFAULT_CLIENT_FEATURE)); - Assert.assertEquals(ImmutableMap.of(DEFAULT_CLIENT_FEATURE, new SplitResult(ON_TREATMENT, null)), splitClient.getTreatmentsWithConfig(new Key(ARBITRARY_KEY, ARBITRARY_KEY), Arrays.asList(DEFAULT_CLIENT_FEATURE), new HashMap<>(), new EvaluationOptions(new HashMap<>()))); + Assert.assertEquals(Collections.singletonMap(DEFAULT_CLIENT_FEATURE, new SplitResult(ON_TREATMENT, null)), splitClient.getTreatmentsWithConfig(new Key(ARBITRARY_KEY, ARBITRARY_KEY), Arrays.asList(DEFAULT_CLIENT_FEATURE), new HashMap<>(), new EvaluationOptions(new HashMap<>()))); Assert.assertEquals(new HashMap<>(), splitClient.getTreatmentsByFlagSet(ARBITRARY_KEY, "flagset", new HashMap<>(), new EvaluationOptions(new HashMap<>()))); Assert.assertEquals(new HashMap<>(), splitClient.getTreatmentsByFlagSet(ARBITRARY_KEY, "flagset", new EvaluationOptions(new HashMap<>()))); From 4c38aa45f75a4a08a0d0a90016899c786dae01eb Mon Sep 17 00:00:00 2001 From: alejovazquezsplit Date: Mon, 3 Aug 2026 11:43:50 -0300 Subject: [PATCH 3/4] reverting parent pom --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7713ddd0..271ba171 100644 --- a/pom.xml +++ b/pom.xml @@ -66,9 +66,9 @@ pluggable-storage redis-wrapper + testing okhttp-modules client - testing From 5eb77e289b8cbf6d38cb78f6c1e5ef8dd5690359 Mon Sep 17 00:00:00 2001 From: alejovazquezsplit Date: Mon, 3 Aug 2026 11:58:41 -0300 Subject: [PATCH 4/4] pom version --- testing/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testing/pom.xml b/testing/pom.xml index 44eebf1e..71b8ca91 100644 --- a/testing/pom.xml +++ b/testing/pom.xml @@ -9,7 +9,7 @@ java-client-testing jar - 5.0.0-rc + 5.0.0 Java Client For Testing Testing suite for Java SDK for Split