cameronlee314 commented on a change in pull request #1083: SAMZA-2251: Minor diagnostics manager change to emit additional job details URL: https://github.com/apache/samza/pull/1083#discussion_r296822166
########## File path: samza-core/src/test/java/org/apache/samza/diagnostics/TestDiagnosticsManager.java ########## @@ -103,20 +158,56 @@ public void testDiagnosticsStreamPublish() { Assert.assertEquals(metricsSnapshot.getHeader().getHost(), hostname); Assert.assertEquals(metricsSnapshot.getHeader().getSource(), DiagnosticsManager.class.getName()); + } + + private void validateOutgoingMessageEnvelope(OutgoingMessageEnvelope outgoingMessageEnvelope) { + MetricsSnapshot metricsSnapshot = + new MetricsSnapshotSerdeV2().fromBytes((byte[]) outgoingMessageEnvelope.getMessage()); + // Validate the diagnostics stream message DiagnosticsStreamMessage diagnosticsStreamMessage = DiagnosticsStreamMessage.convertToDiagnosticsStreamMessage(metricsSnapshot); - Assert.assertEquals(containerMb, diagnosticsStreamMessage.getContainerMb()); - Assert.assertTrue(diagnosticsStreamMessage.getExceptionEvents() == null); - Assert.assertTrue(diagnosticsStreamMessage.getProcessorStopEvents() == null); + Assert.assertTrue(diagnosticsStreamMessage.getContainerMb().equals(containerMb)); Review comment: Minor: `Assert.assertEquals` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services