Assertion failure in updatephysicalnetwork Test. Signed-off-by: Jayapal <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/1c924e5a Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/1c924e5a Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/1c924e5a Branch: refs/heads/master Commit: 1c924e5ab5bf4c9059e1121105c436cd7d06c700 Parents: 9742459 Author: Bharat Kumar <[email protected]> Authored: Fri Jun 28 18:11:59 2013 +0530 Committer: Jayapal <[email protected]> Committed: Fri Jun 28 19:05:55 2013 +0530 ---------------------------------------------------------------------- server/test/com/cloud/network/UpdatePhysicalNetworkTest.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/1c924e5a/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java ---------------------------------------------------------------------- diff --git a/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java b/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java index ca9d149..25c023e 100644 --- a/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java +++ b/server/test/com/cloud/network/UpdatePhysicalNetworkTest.java @@ -22,6 +22,7 @@ import com.cloud.network.NetworkServiceImpl; import com.cloud.network.dao.PhysicalNetworkDao; import com.cloud.network.dao.PhysicalNetworkVO; import com.cloud.utils.Pair; +import com.cloud.utils.db.Transaction; import org.junit.Test; import org.junit.*; import org.mockito.ArgumentCaptor; @@ -54,6 +55,7 @@ public class UpdatePhysicalNetworkTest { @Test public void updatePhysicalNetworkTest(){ + Transaction txn = Transaction.open("updatePhysicalNetworkTest"); NetworkServiceImpl networkService = setUp(); existingRange.add(new Pair<Integer, Integer>(520, 524)); when(_physicalNetworkDao.findById(anyLong())).thenReturn(physicalNetworkVO); @@ -61,6 +63,7 @@ public class UpdatePhysicalNetworkTest { when(_physicalNetworkDao.update(anyLong(), any(physicalNetworkVO.getClass()))).thenReturn(true); when(physicalNetworkVO.getVnet()).thenReturn(existingRange); networkService.updatePhysicalNetwork(1l, null, null, "525-530", null, null); + txn.close("updatePhysicalNetworkTest"); verify(physicalNetworkVO).setVnet(argumentCaptor.capture()); assertEquals("520-530", argumentCaptor.getValue()); }
