tillrohrmann commented on a change in pull request #11353: [FLINK-16438][yarn]
Make YarnResourceManager starts workers using WorkerResourceSpec requested by
SlotManager
URL: https://github.com/apache/flink/pull/11353#discussion_r403092773
##########
File path:
flink-kubernetes/src/test/java/org/apache/flink/kubernetes/KubernetesResourceManagerTest.java
##########
@@ -176,6 +185,15 @@ MainThreadExecutor getMainThreadExecutorForTesting() {
SlotManager getSlotManager() {
return this.slotManager;
}
+
+ @Override
+ public Map<WorkerResourceSpec, Integer> getPendingWorkerNums() {
+ return customPendingWorkerNums != null ?
customPendingWorkerNums : super.getPendingWorkerNums();
+ }
+
+ public void setCustomPendingWorkerNums(final
Map<WorkerResourceSpec, Integer> customPendingWorkerNums) {
+ this.customPendingWorkerNums = customPendingWorkerNums;
+ }
Review comment:
I think this is pretty much whitebox testing as it strongly relies on
internal implementation details. I would recommend to go another way and to
rely either on the public APIs of the component or to encapsulate the
bookkeeping logic so that it can be tested separately.
----------------------------------------------------------------
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]
With regards,
Apache Git Services