rmatharu commented on a change in pull request #1406:
URL: https://github.com/apache/samza/pull/1406#discussion_r463897962
##########
File path:
samza-core/src/test/scala/org/apache/samza/serializers/TestMetricsSnapshotSerde.scala
##########
@@ -43,6 +39,9 @@ class TestMetricsSnapshotSerde {
val snapshot = new MetricsSnapshot(header, metrics)
val serde = new MetricsSnapshotSerde()
val bytes = serde.toBytes(snapshot)
- assertTrue(serde.fromBytes(bytes).equals(metrics))
+ val deserialized = serde.fromBytes(bytes)
+
assertTrue(deserialized.getHeader.jobName.equals(snapshot.getHeader.jobName))
+ assertTrue(deserialized.getHeader.jobId.equals(snapshot.getHeader.jobId))
+
assertTrue(deserialized.getMetrics.immutableMetrics.keySet().equals(snapshot.getMetrics.immutableMetrics.keySet()))
Review comment:
Remove?
This code branch and test need not be updated.
To test we need to test equality on the header-map and the metric map, not
just their keyset, and specific keys (jobname, jobid)
----------------------------------------------------------------
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:
[email protected]