kfaraz commented on code in PR #16420:
URL: https://github.com/apache/druid/pull/16420#discussion_r1596181109


##########
indexing-service/src/test/java/org/apache/druid/indexing/common/task/ClientCompactionTaskQuerySerdeTest.java:
##########
@@ -351,7 +358,16 @@ public void 
testCompactionTaskToClientCompactionTaskQuery() throws IOException
     final byte[] json = mapper.writeValueAsBytes(task);
     final ClientCompactionTaskQuery actual = (ClientCompactionTaskQuery) 
mapper.readValue(json, ClientTaskQuery.class);
 
-    Assert.assertEquals(expected, actual);
+    Assert.assertEquals(expected.getDataSource(), actual.getDataSource());
+    Assert.assertEquals(expected.getId(), actual.getId());
+    Assert.assertEquals(expected.getType(), actual.getType());
+    Assert.assertEquals(expected.getGranularitySpec(), 
actual.getGranularitySpec());
+    Assert.assertEquals(expected.getDimensionsSpec(), 
actual.getDimensionsSpec());
+    Assert.assertEquals(expected.getIoConfig(), actual.getIoConfig());
+    Assert.assertEquals(expected.getTransformSpec(), 
actual.getTransformSpec());
+    Assert.assertArrayEquals(expected.getMetricsSpec(), 
actual.getMetricsSpec());
+    Assert.assertEquals(expected.getTuningConfig(), actual.getTuningConfig());

Review Comment:
   Hmm, I suppose there is another way. It would not only help us retain the 
original equality check but also clearly indicate the new params that 
`CompactionTask` adds to the context.
   
   ```suggestion
       // Verify that CompactionTask has added new parameters into the context 
       Assert.assertNotEquals(expected, actual);
       
       expectedContext.put(LookupLoadingSpec.CTX_LOOKUP_LOADING_MODE, 
LookupLoadingSpec.Mode.NONE.toString());
       Assert.assertEquals(expected, actual);
   ```



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to