adarshsanjeev commented on code in PR #13726:
URL: https://github.com/apache/druid/pull/13726#discussion_r1094359575
##########
extensions-core/multi-stage-query/src/test/java/org/apache/druid/msq/exec/MSQInsertTest.java:
##########
@@ -99,6 +99,40 @@ public void testInsertOnFoo1()
.setExpectedRowSignature(rowSignature)
.setExpectedSegment(expectedFooSegments())
.setExpectedResultRows(expectedFooRows())
+ .setExpectedCountersForStageWorkerChannel(
+ CounterSnapshotBuilder
+ .with().totalFiles(1)
+ .buildChannelCounter(),
+ 0, 0, "input0"
+ )
+ .setExpectedCountersForStageWorkerChannel(
+ CounterSnapshotBuilder
+ .with().rows(5).bytes(251).frames(1)
+ .buildChannelCounter(),
+ 0, 0, "shuffle"
+ )
+ .setExpectedCountersForStageWorkerChannel(
+ CounterSnapshotBuilder
+ .with().rows(5).bytes(251).frames(1)
+ .buildChannelCounter(),
+ 1, 0, "input0"
+ )
+ .setExpectedCountersForStageWorkerChannel(
+ CounterSnapshotBuilder
+ .with().rows(1, 1, 1, 1, 1).bytes(92, 89, 89, 91,
91).frames(1, 1, 1, 1, 1)
Review Comment:
Thanks for the suggestion! Yes, it would have been pretty painful to change
the bytes in the assertions. I have changed the code so that it no longer
asserts for the type of counter unless it is specified. I think this should
prevent the tests from being too fragile. Rows and number of frames, if
changed, could be calculated without much trial and error.
Please let me know if this looks good or if any other improvements could 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]