cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] rhtyd commented on a change in pull request #3601: [WIP] JDK11 support
Date Thu, 09 Jan 2020 04:15:07 GMT
rhtyd commented on a change in pull request #3601: [WIP] JDK11 support
URL: https://github.com/apache/cloudstack/pull/3601#discussion_r364552918
 
 

 ##########
 File path: server/src/test/java/com/cloud/storage/listener/StoragePoolMonitorTest.java
 ##########
 @@ -58,17 +60,18 @@ public void setUp() throws Exception {
 
     @Test
     public void testProcessConnectStoragePoolNormal() throws Exception {
-        Mockito.when(poolDao.listBy(Mockito.anyLong(), Mockito.anyLong(), Mockito.anyLong(),
Mockito.any(ScopeType.class))).thenReturn(Collections.singletonList(pool));
+        Mockito.when(poolDao.listBy(nullable(Long.class), nullable(Long.class), nullable(Long.class),
Mockito.any(ScopeType.class))).thenReturn(Collections.singletonList(pool));
         Mockito.when(poolDao.findZoneWideStoragePoolsByTags(Mockito.anyLong(), Mockito.any(String[].class))).thenReturn(Collections.<StoragePoolVO>emptyList());
         Mockito.when(poolDao.findZoneWideStoragePoolsByHypervisor(Mockito.anyLong(), Mockito.any(Hypervisor.HypervisorType.class))).thenReturn(Collections.<StoragePoolVO>emptyList());
+        Mockito.doNothing().when(storageManager).connectHostToSharedPool(host.getId(), pool.getId());
 
         storagePoolMonitor.processConnect(host, cmd, false);
 
         Mockito.verify(storageManager, Mockito.times(1)).connectHostToSharedPool(Mockito.eq(host.getId()),
Mockito.eq(pool.getId()));
         Mockito.verify(storageManager, Mockito.times(1)).createCapacityEntry(Mockito.eq(pool.getId()));
     }
 
-    @Test(expected = ConnectionException.class)
+    @Test
 
 Review comment:
   Yes I suppose. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message