Lior Vernia has uploaded a new change for review. Change subject: core: Modified statistics removal DAO test ......................................................................
core: Modified statistics removal DAO test The test's description didn't match what it was actually testing (in fact, I couldn't figure out what it was indeed testing). Changed the test to fit the description. Change-Id: I79979f22ad17db9e12d403774cd84d77338a43ab Signed-off-by: Lior Vernia <[email protected]> --- M backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/InterfaceDaoTest.java 1 file changed, 3 insertions(+), 8 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/62/36462/1 diff --git a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/InterfaceDaoTest.java b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/InterfaceDaoTest.java index 8942dcb..93e6e55 100644 --- a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/InterfaceDaoTest.java +++ b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/InterfaceDaoTest.java @@ -143,20 +143,15 @@ List<VdsNetworkInterface> before = dao.getAllInterfacesForVds(VDS_ID); for (VdsNetworkInterface iface : before) { - assertNotSame(0.0, iface.getStatistics().getTransmitRate()); - assertNotSame(0.0, iface.getStatistics().getReceiveRate()); - assertNotSame(0.0, iface.getStatistics().getReceiveDropRate()); - assertNotSame(0.0, iface.getStatistics().getReceiveDropRate()); + assertNotNull(iface.getStatistics()); } dao.removeStatisticsForVds(FixturesTool.VDS_NETWORK_INTERFACE); List<VdsNetworkInterface> after = dao.getAllInterfacesForVds(VDS_ID); for (VdsNetworkInterface iface : after) { - assertEquals(0.0, iface.getStatistics().getTransmitRate(), 0.0001); - assertEquals(0.0, iface.getStatistics().getReceiveRate(), 0.0001); - assertEquals(0.0, iface.getStatistics().getReceiveDropRate(), 0.0001); - assertEquals(0.0, iface.getStatistics().getReceiveDropRate(), 0.0001); + assertTrue(iface.getId().equals(FixturesTool.VDS_NETWORK_INTERFACE) ? iface.getStatistics() == null + : iface.getStatistics() != null); } } -- To view, visit http://gerrit.ovirt.org/36462 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I79979f22ad17db9e12d403774cd84d77338a43ab Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Lior Vernia <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
