Skip to content

Commit ed025d2

Browse files
committed
Fix test failures
1 parent 0345d20 commit ed025d2

1 file changed

Lines changed: 1 addition & 8 deletions

File tree

plugins/storage/volume/scaleio/src/test/java/org/apache/cloudstack/storage/datastore/lifecycle/ScaleIOPrimaryDataStoreLifeCycleTest.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,8 @@ public void tearDown() throws Exception {
129129
}
130130

131131
@Test
132-
public void testAttachZone() throws Exception {
132+
public void testAttachZone() {
133133
final DataStore dataStore = mock(DataStore.class);
134-
when(dataStore.getId()).thenReturn(1L);
135134

136135
MockedStatic<ScaleIOGatewayClientConnectionPool> scaleIOGatewayClientConnectionPoolMocked = mockStatic(ScaleIOGatewayClientConnectionPool.class);
137136
ScaleIOGatewayClientImpl client = mock(ScaleIOGatewayClientImpl.class);
@@ -152,12 +151,6 @@ public void testAttachZone() throws Exception {
152151
when(resourceManager.getEligibleUpAndEnabledHostsInZoneForStorageConnection(dataStore, scope.getScopeId(), Hypervisor.HypervisorType.KVM))
153152
.thenReturn(Arrays.asList(host1, host2));
154153

155-
when(dataStoreMgr.getDataStore(anyLong(), eq(DataStoreRole.Primary))).thenReturn(store);
156-
when(store.isShared()).thenReturn(true);
157-
when(store.getStorageProviderName()).thenReturn(ScaleIOUtil.PROVIDER_NAME);
158-
159-
when(dataStoreProviderMgr.getDataStoreProvider(ScaleIOUtil.PROVIDER_NAME)).thenReturn(dataStoreProvider);
160-
when(dataStoreProvider.getName()).thenReturn(ScaleIOUtil.PROVIDER_NAME);
161154
storageMgr.registerHostListener(ScaleIOUtil.PROVIDER_NAME, hostListener);
162155

163156
when(dataStoreHelper.attachZone(Mockito.any(DataStore.class))).thenReturn(null);

0 commit comments

Comments
 (0)