This commit is contained in:
Pearl Dsilva 2026-01-29 22:38:41 -05:00 committed by dahn
parent 1414c0edf7
commit 824257d368
2 changed files with 8 additions and 22 deletions

View File

@ -2061,8 +2061,8 @@ public abstract class GenericDaoBase<T, ID extends Serializable> extends Compone
}
}
if(attr == null) {
logger.warn(String.format("Failed to find attribute in the entity %s to map column %s.%s (%s)",
ClassUtils.getUserClass(entity).getSimpleName(), tableName, columnName));
logger.warn("Failed to find attribute in the entity {} to map column {}.{}",
ClassUtils.getUserClass(entity).getSimpleName(), tableName, columnName);
} else {
setField(entity, attr.field, rs, index);
}

View File

@ -240,17 +240,13 @@ public class VmwareDatacenterApiUnitTest {
closeable.close();
}
//@Test(expected = InvalidParameterValueException.class)
@Test
@Ignore
@Test(expected = InvalidParameterValueException.class)
public void testAddVmwareDcToInvalidZone() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(addCmd.getZoneId()).thenReturn(2L);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = ResourceInUseException.class)
@Test
@Ignore
@Test(expected = ResourceInUseException.class)
public void testAddVmwareDcToZoneWithClusters() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(_clusterDao.listByZoneId(1L)).thenReturn(clusterList);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
@ -269,47 +265,37 @@ public class VmwareDatacenterApiUnitTest {
}
//@Test(expected = ResourceInUseException.class)
@Test
@Ignore
public void testAddVmwareDcToZoneWithVmwareDc() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(_vmwareDcDao.getVmwareDatacenterByNameAndVcenter(vmwareDcName, vCenterHost)).thenReturn(vmwareDcs);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = InvalidParameterValueException.class)
@Test
@Ignore
@Test(expected = InvalidParameterValueException.class)
public void testAddVmwareDcWithNullUser() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(addCmd.getUsername()).thenReturn(null);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = InvalidParameterValueException.class)
@Test
@Ignore
@Test(expected = InvalidParameterValueException.class)
public void testAddVmwareDcWithNullPassword() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(addCmd.getPassword()).thenReturn(null);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = InvalidParameterValueException.class)
@Test
@Ignore
@Test(expected = InvalidParameterValueException.class)
public void testAddVmwareDcWithNullUrl() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(addCmd.getVcenter()).thenReturn(null);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = InvalidParameterValueException.class)
@Test
@Ignore
@Test(expected = InvalidParameterValueException.class)
public void testAddVmwareDcWithNullDcName() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(addCmd.getName()).thenReturn(null);
_vmwareDatacenterService.addVmwareDatacenter(addCmd);
}
//@Test(expected = CloudRuntimeException.class)
@Test
@Ignore
public void testReAddVmwareDc() throws ResourceInUseException, IllegalArgumentException, DiscoveryException, Exception {
Mockito.when(_vmwareDcZoneMapDao.findByZoneId(1L)).thenReturn(dcZoneMap);