tillrohrmann commented on a change in pull request #6499: [hotfix] loose 
dependency to mockito
URL: https://github.com/apache/flink/pull/6499#discussion_r208244325
 
 

 ##########
 File path: 
flink-yarn/src/test/java/org/apache/flink/yarn/YarnResourceManagerTest.java
 ##########
 @@ -304,19 +318,149 @@ public void grantLeadership() throws Exception {
                /**
                 * Start the resource manager and grant leadership to it.
                 */
-               public void startResourceManager() throws Exception {
+               void startResourceManager() throws Exception {
                        resourceManager.start();
                        rmServices.grantLeadership();
                }
 
                /**
                 * Stop the Akka actor system.
                 */
-               public void stopResourceManager() throws Exception {
+               void stopResourceManager() throws Exception {
                        rpcService.stopService().get();
                }
        }
 
+       static class TestingContainer extends Container {
+               private final NodeId nodeId;
+               private final ContainerId containerId;
+               private Resource resource;
+               private Priority priority;
+
+               TestingContainer(String host, int port, int containerId) {
+                       this.nodeId = NodeId.newInstance(host, port);
+                       this.containerId = ContainerId.newInstance(
+                               ApplicationAttemptId.newInstance(
+                                       
ApplicationId.newInstance(System.currentTimeMillis(), 1),
+                                       1
+                               ),
+                               containerId
+                       );
+               }
+
+               @Override
+               public ContainerId getId() {
+                       return containerId;
+               }
+
+               @Override
+               public void setId(ContainerId containerId) {
+
 
 Review comment:
   Should we throw an `UnsupportedOperationException` in order to be on the 
safe side if someone should ever call this method?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to