kgyrtkirk commented on code in PR #17325:
URL: https://github.com/apache/druid/pull/17325#discussion_r1819081198
##########
extensions-core/kafka-indexing-service/src/test/java/org/apache/druid/indexing/kafka/supervisor/KafkaSupervisorSpecTest.java:
##########
@@ -310,71 +317,115 @@ public void testSerdeWithInputFormat() throws IOException
KafkaSupervisorSpec spec2 = mapper.readValue(serialized,
KafkaSupervisorSpec.class);
String stable = mapper.writeValueAsString(spec2);
+ String sortedStableJson = sortJsonString(stable);
Review Comment:
Could you point to a test failure when this happened without instrumentation?
> The sort function I created could be used as a general-purpose tool to
ensure deterministic ordering across tests
I don't think that would be a good path forward - it reorders arrays without
thinking about that may semantically be different...its ok to reorder if the
array is say argument to an `IN` ; but if they are arguments to a function they
may mean a different thing in a different order.
I think to fix these things for sure - the source should be addressed and
not add extra lenient comparision stuff to the tests.
I'm not sure I was able to find the answers for my previous questions above:
* could you point to the field which's comparision is the root cause of
these failures? are there any options there to alter the production code to be
more stable?
* have you considered/evaluated making the `KafkaSupervisorSpec`/etc
comparable - so that instead of resorting to string comparision application
level comparision can be made?
--
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]