Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CIN-885] fix for delete event serialized issue #777

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public class DockerTags
private static final String TRANSFORM_ROUTER_TAG_DEFAULT = "4.0.1";
private static final String TRANSFORM_CORE_AIO_TAG_DEFAULT = "5.0.1";
private static final String SFS_TAG_DEFAULT = "4.0.1";
private static final String HXI_CONNECTOR_TAG_DEFAULT = "1.0.0-SNAPSHOT";
private static final String HXI_CONNECTOR_TAG_DEFAULT = "1.0.2-SNAPSHOT";
private static final String PROPERTIES_FILE = "docker-tags.properties";

private static Properties properties;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,14 @@ void testDeleteRequest()

// then
String expectedBody = """
{
"objectId": "d71dd823-82c7-477c-8490-04cb0e826e65",
"sourceId" : "alfresco-dummy-source-id-0a63de491876",
"eventType": "delete",
"sourceTimestamp": 1611656982995
}""";
[
{
"objectId": "d71dd823-82c7-477c-8490-04cb0e826e65",
"sourceId" : "alfresco-dummy-source-id-0a63de491876",
"eventType": "delete",
"sourceTimestamp": 1611656982995
}
]""";
containerSupport.expectHxIngestMessageReceived(expectedBody);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1179,12 +1179,14 @@ void testUpdateRequestWithAspectInAllowedFilterAndTypeInAllowedFilterAndAncestor

// then send a delete event
String expectedBody = """
{
[
{
"objectId" : "d71dd823-82c7-477c-8490-04cb0e826e14",
"sourceId" : "alfresco-dummy-source-id-0a63de491876",
"sourceTimestamp": 1611656982995,
"eventType" : "delete"
}
]
""";
containerSupport.expectHxIngestMessageReceived(expectedBody);
}
Expand Down Expand Up @@ -1261,12 +1263,14 @@ void testUpdateRequestWithAspectModifiedToFitDeniedFilterAndTypeInAllowedFilterA

// then send a delete event
String expectedBody = """
{
[
{
"objectId" : "d71dd823-82c7-477c-8490-04cb0e826e15",
"sourceId" : "alfresco-dummy-source-id-0a63de491876",
"sourceTimestamp" : 1611656982995,
"eventType" : "delete"
}
]
""";
containerSupport.expectHxIngestMessageReceived(expectedBody);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public void serialize(DeleteNodeEvent event, JsonGenerator jgen, SerializerProvi
{
try
{
jgen.writeStartArray();
jgen.writeStartObject();

jgen.writeStringField("objectId", event.getObjectId());
Expand All @@ -63,6 +64,7 @@ public void serialize(DeleteNodeEvent event, JsonGenerator jgen, SerializerProvi
jgen.writeStringField("eventType", serializeEventType(event.getEventType()));

jgen.writeEndObject();
jgen.writeEndArray();
}
catch (Exception e)
{
Expand Down
Loading