zentol commented on a change in pull request #16345:
URL: https://github.com/apache/flink/pull/16345#discussion_r662991273
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/metrics/util/MetricUtilsTest.java
##########
@@ -83,16 +81,24 @@ public void
testStartMetricActorSystemRespectsThreadPriority() throws Exception
final RpcService rpcService =
MetricUtils.startRemoteMetricsRpcService(
configuration, "localhost", RpcSystem.load());
- assertThat(rpcService, instanceOf(AkkaRpcService.class));
-
- final ActorSystem actorSystem = ((AkkaRpcService)
rpcService).getActorSystem();
try {
+ // dirty reflection code to avoid ClassCastExceptions
+ final Method getActorSystem =
rpcService.getClass().getMethod("getActorSystem");
Review comment:
ClassCastExceptions because the actual loading happens in the plugin
loader but references here would use the system loader.
--
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]