XComp commented on a change in pull request #14220:
URL: https://github.com/apache/flink/pull/14220#discussion_r530367732
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/ClusterConfigurationInfoTest.java
##########
@@ -31,9 +36,28 @@
@Override
protected ClusterConfigurationInfo getTestResponseInstance() {
final ClusterConfigurationInfo expected = new
ClusterConfigurationInfo(2);
- expected.add(new ClusterConfigurationInfoEntry("key1",
"value1"));
- expected.add(new ClusterConfigurationInfoEntry("key2",
"value2"));
+ expected.add(new ClusterConfigurationInfoEntry<>("key-string",
"value1"));
+ expected.add(new ClusterConfigurationInfoEntry<>("key-int",
123));
+ // any long value being below Integer.MAX_VALUE would cause a
failure due to Jackson creating
+ // an Integer out of it during deserialization
+ expected.add(new ClusterConfigurationInfoEntry<>("key-long",
9876543210L));
Review comment:
This is a tricky one. I couldn't use `123L` here.
`ClusterConfigurationInfoTest.testJsonMarshalling` would fail here because of
the unmarshalling would transform the number into an integer here.
[RestResponseMarshallingTestBase.assertOriginalEqualsUnmarshalled](https://github.com/apache/flink/blob/b3bd616e7f6ed4e3b4c740793058e977f1a7f4ca/flink-runtime/src/test/java/org/apache/flink/runtime/rest/messages/RestResponseMarshallingTestBase.java#L87)
would cause the failure.
Either we leave it like that as it is right now. Or we change
`RestResponseMarshallingTestBase.assertOriginalEqualsUnmarshalled` to have a
custom assert implementation not checking the type for numbers.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]