erickalendra commented on code in PR #10686:
URL: https://github.com/apache/cloudstack/pull/10686#discussion_r2037773462


##########
plugins/hypervisors/vmware/src/test/java/com/cloud/hypervisor/vmware/resource/VmwareResourceTest.java:
##########
@@ -201,11 +201,9 @@ public VmwareHypervisorHost getHyperHost(VmwareContext 
context, Command cmd) {
 
     private Map<String,String> specsArray = new HashMap<String,String>();
 
-    AutoCloseable closeable;
 
     @Before
     public void setup() throws Exception {
-        closeable = MockitoAnnotations.openMocks(this);

Review Comment:
   The class is annotated with `@RunWith(MockitoJUnitRunner.class)` which is 
calling `MockitoAnnotations.openMocks(...);` before every test. Calling 
`openMocks` a second time can have undesirable side effects.
   
   I removed the line as it was unnecessary and could issues in some 
circumstances. 



-- 
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: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to