diff --git a/java-reporter-core/pom.xml b/java-reporter-core/pom.xml
index 582e396..e92b44d 100644
--- a/java-reporter-core/pom.xml
+++ b/java-reporter-core/pom.xml
@@ -7,7 +7,7 @@
io.testomat
java-reporter-core
- 0.9.2
+ 0.9.3
jar
Testomat.io Reporter Core
diff --git a/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java b/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
index f0a1768..5a4032f 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/constants/CommonConstants.java
@@ -1,7 +1,7 @@
package io.testomat.core.constants;
public class CommonConstants {
- public static final String REPORTER_VERSION = "0.9.2";
+ public static final String REPORTER_VERSION = "0.9.3";
public static final String TESTS_STRING = "tests";
public static final String API_KEY_STRING = "api_key";
diff --git a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ReportedTestStorage.java b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ReportedTestStorage.java
index 7d0db84..f4cf799 100644
--- a/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ReportedTestStorage.java
+++ b/java-reporter-core/src/main/java/io/testomat/core/facade/methods/artifact/ReportedTestStorage.java
@@ -21,19 +21,25 @@ public class ReportedTestStorage {
/**
* Stores test execution metadata in the internal storage.
*
- * The method adds a new entry containing {@code test_id} and {@code rid}
- * only if an entry with the same values does not already exist.
- * The check and insertion are performed atomically using synchronization
- * to prevent duplicates in concurrent environments.
+ * The method extracts {@code test_id} and {@code rid} from the provided body
+ * and stores them as a new entry if an identical pair does not already exist.
+ * If {@code rid} is {@code null}, the entry is ignored and nothing is stored.
+ *
+ * The existence check and insertion are performed inside a synchronized block
+ * to guarantee atomicity and prevent duplicate entries in concurrent environments.
*
- * @param body a map containing test execution data; expected to include
- * {@code "test_id"} and {@code "rid"} keys
+ * @param body a map containing test execution data. Expected to contain
+ * {@code "rid"} and optionally {@code "test_id"}.
*/
public static void store(Map body) {
Object testId = body.get("test_id");
Object rid = body.get("rid");
+ if (rid == null) {
+ return;
+ }
+
synchronized (STORAGE) {
boolean exists = STORAGE.stream().anyMatch(m ->
diff --git a/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java b/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
index cc66b82..9f8526c 100644
--- a/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
+++ b/java-reporter-core/src/test/java/io/testomat/core/artifact/ReportedTestStorageTest.java
@@ -3,7 +3,6 @@
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNotNull;
-import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.Arrays;
@@ -177,20 +176,33 @@ void testEmptyArtifactLinkList() {
}
@Test
- @DisplayName("Should handle null values in test data")
- void testNullValuesInTestData() {
+ @DisplayName("Should not store duplicate entries with same test_id and rid")
+ void testNoDuplicateEntries() {
Map body = new HashMap<>();
- body.put("test_id", null);
- body.put("rid", null);
+ body.put("test_id", "test-1");
+ body.put("rid", "rid-1");
+ ReportedTestStorage.store(body);
ReportedTestStorage.store(body);
List