Commit 59f292e1 authored by harshit aggarwal's avatar harshit aggarwal Committed by Kishore Battula
Browse files

Minor logging additions

parent 4c5c4f68
......@@ -39,6 +39,8 @@ public class ProcessWKSTransform {
try {
RawRecordDetails[] rawRecordDetails = retrieveDataFromMessage(message);
wKSService.transform(rawRecordDetails, dataPartitionId, correlationId);
LOGGER.info("Transformation completed for message with id: " + message.getMessageId());
} catch (BadRequestException e) {
LOGGER.error("Bad Request Reason: {}, pubsub message id: {}", e.getErrorMsg(),
message.getMessageId());
......@@ -51,6 +53,7 @@ public class ProcessWKSTransform {
}
private RawRecordDetails[] retrieveDataFromMessage(IMessage message) throws BadRequestException {
LOGGER.info("Transformation started for message with id: " + message.getMessageId());
String messageData = new String(message.getMessageBody().getBinaryData().get(0), UTF_8);
JsonElement jsonRoot = JsonParser.parseString(messageData);
......
......@@ -81,7 +81,7 @@ public class ProcessWKSTransformTest {
verify(mdcContextMap, times(1)).getContextMap(correlationId, dataPartitionId);
verify(message, times(2)).getProperties();
verify(message, times(1)).getMessageBody();
verify(message, times(1)).getMessageId();
verify(message, times(2)).getMessageId();
}
@Test
......@@ -94,7 +94,7 @@ public class ProcessWKSTransformTest {
verify(mdcContextMap, times(1)).getContextMap(correlationId, dataPartitionId);
verify(message, times(2)).getProperties();
verify(message, times(1)).getMessageBody();
verify(message, times(1)).getMessageId();
verify(message, times(2)).getMessageId();
}
@Test
......@@ -108,7 +108,7 @@ public class ProcessWKSTransformTest {
verify(mdcContextMap, times(1)).getContextMap(correlationId, dataPartitionId);
verify(message, times(2)).getProperties();
verify(message, times(1)).getMessageBody();
verify(message, times(1)).getMessageId();
verify(message, times(2)).getMessageId();
}
@Test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment