fix(runId): make sure runid includes urn (#13175)

This commit is contained in:
david-leifker 2025-04-10 15:21:42 -05:00 committed by GitHub
parent ca51df880f
commit b82ec1c65e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 0 deletions

View File

@ -121,6 +121,7 @@ public class ElasticSearchService implements EntitySearchService, ElasticSearchI
// Create an upsert document that will be used if the document doesn't exist
Map<String, Object> upsert = new HashMap<>();
upsert.put("urn", urn.toString());
upsert.put("runId", Collections.singletonList(runId));
esWriteDAO.applyScriptUpdate(

View File

@ -89,6 +89,7 @@ public class ElasticSearchServiceTest {
// Verify upsert document
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(runId));
assertEquals(capturedUpsert.get("urn"), TEST_URN.toString());
}
@Test
@ -121,6 +122,7 @@ public class ElasticSearchServiceTest {
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(null));
assertEquals(capturedUpsert.get("urn"), TEST_URN.toString());
}
@Test(expectedExceptions = NullPointerException.class)