mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-07 06:54:48 +00:00
fix(runId): make sure runid includes urn (#13175)
This commit is contained in:
parent
ca51df880f
commit
b82ec1c65e
@ -121,6 +121,7 @@ public class ElasticSearchService implements EntitySearchService, ElasticSearchI
|
|||||||
|
|
||||||
// Create an upsert document that will be used if the document doesn't exist
|
// Create an upsert document that will be used if the document doesn't exist
|
||||||
Map<String, Object> upsert = new HashMap<>();
|
Map<String, Object> upsert = new HashMap<>();
|
||||||
|
upsert.put("urn", urn.toString());
|
||||||
upsert.put("runId", Collections.singletonList(runId));
|
upsert.put("runId", Collections.singletonList(runId));
|
||||||
|
|
||||||
esWriteDAO.applyScriptUpdate(
|
esWriteDAO.applyScriptUpdate(
|
||||||
|
@ -89,6 +89,7 @@ public class ElasticSearchServiceTest {
|
|||||||
// Verify upsert document
|
// Verify upsert document
|
||||||
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
|
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
|
||||||
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(runId));
|
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(runId));
|
||||||
|
assertEquals(capturedUpsert.get("urn"), TEST_URN.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -121,6 +122,7 @@ public class ElasticSearchServiceTest {
|
|||||||
|
|
||||||
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
|
Map<String, Object> capturedUpsert = upsertCaptor.getValue();
|
||||||
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(null));
|
assertEquals(capturedUpsert.get("runId"), Collections.singletonList(null));
|
||||||
|
assertEquals(capturedUpsert.get("urn"), TEST_URN.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test(expectedExceptions = NullPointerException.class)
|
@Test(expectedExceptions = NullPointerException.class)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user