Jiabao-Sun commented on code in PR #23233:
URL: https://github.com/apache/flink/pull/23233#discussion_r1304637348
##########
flink-runtime/src/test/java/org/apache/flink/runtime/operators/drivers/GroupReduceDriverTest.java:
##########
@@ -235,22 +237,16 @@ public void
testAllReduceDriverIncorrectlyAccumulatingMutable() {
Object[] res = result.getList().toArray();
Object[] expected =
DriverTestData.createReduceMutableDataGroupedResult().toArray();
- try {
- DriverTestData.compareTupleArrays(expected, res);
- Assert.fail(
- "Accumulationg mutable objects is expected to result
in incorrect values.");
- } catch (AssertionError e) {
- // expected
- }
+ DriverTestData.compareTupleArrays(expected, res);
Review Comment:
The old code seem's has some problems.
`DriverTestData.compareTupleArrays(expected, res)` is true but I will still
go to `fail()` method, then throws an `AssertionError` which is expected and
ignored.
That means whether the assertion is true or false the test will pass.

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