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

 ##########
 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) {
+
+               }
+
+               @Override
+               public NodeId getNodeId() {
+                       return nodeId;
+               }
+
+               @Override
+               public void setNodeId(NodeId nodeId) {
+
+               }
+
+               @Override
+               public Resource getResource() {
+                       return resource;
+               }
+
+               @Override
+               public void setResource(Resource resource) {
+                       this.resource = resource;
+               }
+
+               @Override
+               public Priority getPriority() {
+                       return priority;
+               }
+
+               @Override
+               public void setPriority(Priority priority) {
+                       this.priority = priority;
+               }
+
+               @Override
+               public Token getContainerToken() {
+                       return null;
+               }
+
+               @Override
+               public void setContainerToken(Token token) {
+
+               }
+
+               @Override
+               public void setNodeHttpAddress(String s) {
+
+               }
+
+               @Override
+               public String getNodeHttpAddress() {
+                       return null;
+               }
+
+               @Override public int compareTo(@Nonnull Container other) {
+                       return 0;
+               }
+       }
+
+       static class TestingContainerStatus extends ContainerStatus {
+               private ContainerId containerId;
+
+               TestingContainerStatus() {
+
+               }
+
+               @Override
+               public ContainerId getContainerId() {
+                       return containerId;
+               }
+
+               @Override
+               public void setContainerId(ContainerId containerId) {
+                       this.containerId = containerId;
+               }
+
+               @Override
+               public ContainerState getState() {
+                       return ContainerState.COMPLETE;
+               }
+
+               @Override
+               public void setState(ContainerState containerState) {
+
+               }
+
+               @Override
+               public int getExitStatus() {
+                       return -1;
+               }
+
+               @Override
+               public void setExitStatus(int exitStatus) {
+
 
 Review comment:
   `UnsupportedOperationException`?

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