Skip to content

Commit 8c1954f

Browse files
Pearl1594DaanHoogland
authored andcommitted
fix issues
1 parent 6ac1730 commit 8c1954f

File tree

13 files changed

+45
-6
lines changed

13 files changed

+45
-6
lines changed

plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResourceTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
import org.joda.time.Duration;
7373
import org.junit.Assert;
7474
import org.junit.Before;
75+
import org.junit.Ignore;
7576
import org.junit.Test;
7677
import org.junit.runner.RunWith;
7778
import org.libvirt.Connect;
@@ -5607,6 +5608,7 @@ public void testAddExtraConfigComponentNotEmptyExtraConfig() {
56075608
Mockito.verify(vmDef, times(1)).addComp(Mockito.any());
56085609
}
56095610

5611+
@Ignore
56105612
public void validateGetCurrentMemAccordingToMemBallooningWithoutMemBalooning(){
56115613
VirtualMachineTO vmTo = Mockito.mock(VirtualMachineTO.class);
56125614
Mockito.when(vmTo.getType()).thenReturn(Type.User);
@@ -5692,6 +5694,7 @@ public void validateCountDomainRunningVcpus() throws LibvirtException{
56925694
Assert.assertEquals(valueExpected, result);
56935695
}
56945696

5697+
@Ignore
56955698
public void setDiskIoDriverTestIoUring() {
56965699
DiskDef diskDef = configureAndTestSetDiskIoDriverTest(HYPERVISOR_LIBVIRT_VERSION_SUPPORTS_IOURING, HYPERVISOR_QEMU_VERSION_SUPPORTS_IOURING);
56975700
Assert.assertEquals(IoDriverPolicy.IO_URING, diskDef.getIoDriver());

plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/ScaleIOStoragePoolTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat;
3636
import org.junit.Assert;
3737
import org.junit.Before;
38+
import org.junit.Ignore;
3839
import org.junit.Test;
3940
import org.junit.runner.RunWith;
4041
import org.mockito.MockedConstruction;
@@ -140,6 +141,7 @@ public void testDefaults() {
140141
assertTrue(pool.isExternalSnapshot());
141142
}
142143

144+
@Ignore
143145
public void testGetPhysicalDiskWithWildcardFileFilter() throws Exception {
144146
final String volumePath = "6c3362b500000001:vol-139-3d2c-12f0";
145147
final String systemId = "218ce1797566a00f";

plugins/hypervisors/vmware/src/test/java/com/cloud/hypervisor/vmware/VmwareDatacenterApiUnitTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
import org.apache.cloudstack.test.utils.SpringUtils;
8080
import org.junit.After;
8181
import org.junit.Before;
82+
import org.junit.Ignore;
8283
import org.junit.Test;
8384
import org.junit.runner.RunWith;
8485
import org.mockito.Mock;
@@ -240,12 +241,16 @@ public void tearDown() throws Exception {
240241
}
241242

242243
//@Test(expected = InvalidParameterValueException.class)
244+
@Test
245+
@Ignore
243246
public void testAddVmwareDcToInvalidZone() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
244247
Mockito.when(addCmd.getZoneId()).thenReturn(2L);
245248
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
246249
}
247250

248251
//@Test(expected = ResourceInUseException.class)
252+
@Test
253+
@Ignore
249254
public void testAddVmwareDcToZoneWithClusters() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
250255
Mockito.when(_clusterDao.listByZoneId(1L)).thenReturn(clusterList);
251256
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
@@ -264,36 +269,48 @@ public void testRemoveVmwareDcToZoneWithClusters() throws ResourceInUseException
264269
}
265270

266271
//@Test(expected = ResourceInUseException.class)
272+
@Test
273+
@Ignore
267274
public void testAddVmwareDcToZoneWithVmwareDc() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
268275
Mockito.when(_vmwareDcDao.getVmwareDatacenterByNameAndVcenter(vmwareDcName, vCenterHost)).thenReturn(vmwareDcs);
269276
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
270277
}
271278

272279
//@Test(expected = InvalidParameterValueException.class)
280+
@Test
281+
@Ignore
273282
public void testAddVmwareDcWithNullUser() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
274283
Mockito.when(addCmd.getUsername()).thenReturn(null);
275284
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
276285
}
277286

278287
//@Test(expected = InvalidParameterValueException.class)
288+
@Test
289+
@Ignore
279290
public void testAddVmwareDcWithNullPassword() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
280291
Mockito.when(addCmd.getPassword()).thenReturn(null);
281292
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
282293
}
283294

284295
//@Test(expected = InvalidParameterValueException.class)
296+
@Test
297+
@Ignore
285298
public void testAddVmwareDcWithNullUrl() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
286299
Mockito.when(addCmd.getVcenter()).thenReturn(null);
287300
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
288301
}
289302

290303
//@Test(expected = InvalidParameterValueException.class)
304+
@Test
305+
@Ignore
291306
public void testAddVmwareDcWithNullDcName() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
292307
Mockito.when(addCmd.getName()).thenReturn(null);
293308
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
294309
}
295310

296311
//@Test(expected = CloudRuntimeException.class)
312+
@Test
313+
@Ignore
297314
public void testReAddVmwareDc() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
298315
Mockito.when(_vmwareDcZoneMapDao.findByZoneId(1L)).thenReturn(dcZoneMap);
299316
_vmwareDatacenterService.addVmwareDatacenter(addCmd);

plugins/hypervisors/xenserver/src/test/java/com/cloud/hypervisor/xenserver/resource/CitrixResourceBaseTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.junit.After;
3838
import org.junit.Assert;
3939
import org.junit.Before;
40+
import org.junit.Ignore;
4041
import org.junit.Test;
4142
import org.junit.runner.RunWith;
4243
import org.mockito.BDDMockito;
@@ -112,6 +113,7 @@ public void beforeTest() throws XenAPIException, XmlRpcException {
112113

113114
}
114115

116+
@Ignore
115117
public void testGetPathFilesException() {
116118
String patch = citrixResourceBase.getPatchFilePath();
117119

@@ -122,6 +124,7 @@ public void testGetPathFilesException() {
122124
}
123125
}
124126

127+
@Ignore
125128
public void testGetPathFilesListReturned() {
126129
String patch = citrixResourceBase.getPatchFilePath();
127130

plugins/network-elements/cisco-vnmc/src/test/java/com/cloud/network/cisco/CiscoVnmcConnectionTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
// under the License.
1717
package com.cloud.network.cisco;
1818

19+
import static org.junit.Assert.assertFalse;
1920
import static org.junit.Assert.assertTrue;
2021

2122
import java.util.Map;
@@ -136,7 +137,7 @@ public void testCreateEdgeFirewall() throws ExecutionException {
136137
@Test
137138
public void testListUnassocAsa1000v() throws ExecutionException {
138139
Map<String, String> response = connection.listUnAssocAsa1000v();
139-
assertTrue(response.size() >= 0);
140+
assertFalse(response.isEmpty());
140141
fwDns = response;
141142
}
142143

plugins/network-elements/cisco-vnmc/src/test/java/com/cloud/network/resource/CiscoVnmcResourceTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import javax.naming.ConfigurationException;
3333

3434
import org.junit.Before;
35+
import org.junit.Ignore;
3536
import org.junit.Test;
3637

3738
import com.cloud.agent.api.Answer;
@@ -79,13 +80,15 @@ public void resourceConfigureFailure() throws ConfigurationException {
7980
}
8081

8182
//@Test
83+
@Ignore
8284
public void resourceConfigure() throws ConfigurationException {
8385
_resource.configure("CiscoVnmcResource", _parameters);
8486
assertTrue("CiscoVnmc".equals(_resource.getName()));
8587
assertTrue(_resource.getType() == Host.Type.ExternalFirewall);
8688
}
8789

8890
//@Test
91+
@Ignore
8992
public void testInitialization() throws ConfigurationException {
9093
_resource.configure("CiscoVnmcResource", _parameters);
9194
StartupCommand[] sc = _resource.initialize();

plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/agent/api/NsxNetworkCommand.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public boolean equals(Object o) {
105105
if (o == null || getClass() != o.getClass()) return false;
106106
if (!super.equals(o)) return false;
107107
NsxNetworkCommand that = (NsxNetworkCommand) o;
108-
return networkResourceId == that.networkResourceId && vmId == that.vmId &&
108+
return networkResourceId.equals(that.networkResourceId) && vmId.equals(that.vmId) &&
109109
Objects.equals(networkResourceName, that.networkResourceName) && Objects.equals(publicIp, that.publicIp)
110110
&& Objects.equals(vmIp, that.vmIp);
111111
}

plugins/network-elements/tungsten/src/test/java/org/apache/cloudstack/network/tungsten/api/command/AddTungstenFabricPolicyRuleCmdTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.apache.cloudstack.api.ServerApiException;
2525
import org.apache.cloudstack.network.tungsten.api.response.TungstenFabricRuleResponse;
2626
import org.apache.cloudstack.network.tungsten.service.TungstenService;
27+
import org.junit.After;
2728
import org.junit.Assert;
2829
import org.junit.Before;
2930
import org.junit.Test;
@@ -67,6 +68,7 @@ public void setup() {
6768
ReflectionTestUtils.setField(addTungstenFabricPolicyRuleCmd, "destEndPort", 1);
6869
}
6970

71+
@After
7072
public void tearDown() throws Exception {
7173
closeable.close();
7274
}

plugins/network-elements/tungsten/src/test/java/org/apache/cloudstack/network/tungsten/api/command/CreateTungstenFabricFirewallRuleCmdTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import org.apache.cloudstack.api.ServerApiException;
2525
import org.apache.cloudstack.network.tungsten.api.response.TungstenFabricFirewallRuleResponse;
2626
import org.apache.cloudstack.network.tungsten.service.TungstenService;
27+
import org.junit.After;
2728
import org.junit.Assert;
2829
import org.junit.Before;
2930
import org.junit.Test;
@@ -66,6 +67,7 @@ public void setup() {
6667
ReflectionTestUtils.setField(createTungstenFabricFirewallRuleCmd, "sequence", 1);
6768
}
6869

70+
@After
6971
public void tearDown() throws Exception {
7072
closeable.close();
7173
}

plugins/network-elements/tungsten/src/test/java/org/apache/cloudstack/network/tungsten/api/command/CreateTungstenFabricProviderCmdTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.apache.cloudstack.api.ServerApiException;
2626
import org.apache.cloudstack.network.tungsten.api.response.TungstenFabricProviderResponse;
2727
import org.apache.cloudstack.network.tungsten.service.TungstenProviderService;
28+
import org.junit.After;
2829
import org.junit.Assert;
2930
import org.junit.Before;
3031
import org.junit.Test;
@@ -60,6 +61,7 @@ public void setup() {
6061
ReflectionTestUtils.setField(createTungstenFabricProviderCmd, "introspectPort", "test");
6162
}
6263

64+
@After
6365
public void tearDown() throws Exception {
6466
closeable.close();
6567
}

0 commit comments

Comments
 (0)