Akshat-Jain commented on code in PR #16420:
URL: https://github.com/apache/druid/pull/16420#discussion_r1595688512


##########
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:
   > Why did we need to break this up?
   
   `context={}` vs `context={lookupLoadingMode=NONE}` since we add NONE in the 
context in CompactionTask's constructor:
   ```java
       // By default, do not load any lookups in sub-tasks launched by 
compaction task.
       addToContextIfAbsent(LookupLoadingSpec.CTX_LOOKUP_LOADING_MODE, 
LookupLoadingSpec.Mode.NONE.toString());
   ```
   
   > How can we retain the original equality check?
   
   We can't since they're not equal anymore. I could technically pass NONE in 
the initial context such that `addToContextIfAbsent` doesn't make any 
difference, and we would be able to retain the original equality check in this 
test, but that seems like a hacky approach to me. Thoughts?



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