You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by hu...@apache.org on 2012/12/07 17:34:18 UTC

git commit: Fix the tests

Updated Branches:
  refs/heads/master 2b74b6e82 -> 9c8eba1da


Fix the tests

Note to self, surefire actually runs with assertions enabled where junit
inside eclipse doesn't. Sure surefire will mark tests as failed when an
assertion is triggered. Take care when mocking stuff.

Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/9c8eba1d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/9c8eba1d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/9c8eba1d

Branch: refs/heads/master
Commit: 9c8eba1da3ee4499d5fb2edc0c732ffa34298d36
Parents: 2b74b6e
Author: Hugo Trippaers <tr...@gmail.com>
Authored: Fri Dec 7 17:34:14 2012 +0100
Committer: Hugo Trippaers <tr...@gmail.com>
Committed: Fri Dec 7 17:34:14 2012 +0100

----------------------------------------------------------------------
 .../com/cloud/network/nicira/NiciraNvpApiTest.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/9c8eba1d/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java
----------------------------------------------------------------------
diff --git a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java b/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java
index 51d9618..42eb96e 100644
--- a/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java
+++ b/plugins/network-elements/nicira-nvp/test/com/cloud/network/nicira/NiciraNvpApiTest.java
@@ -161,6 +161,7 @@ public class NiciraNvpApiTest {
 		when(header.getValue()).thenReturn("text/html");
 		when(_method.getResponseHeader("Content-Type")).thenReturn(header);
 		when(_method.getResponseBodyAsString()).thenReturn("Off to timbuktu, won't be back later.");
+		when(_method.isRequestSent()).thenReturn(true);
 		try {
 			ls = _api.executeCreateObject(ls, LogicalSwitch.class, "/", Collections.<String, String> emptyMap());
 		} finally {
@@ -204,6 +205,7 @@ public class NiciraNvpApiTest {
 		when(header.getValue()).thenReturn("text/html");
 		when(_method.getResponseHeader("Content-Type")).thenReturn(header);
 		when(_method.getResponseBodyAsString()).thenReturn("Off to timbuktu, won't be back later.");
+		when(_method.isRequestSent()).thenReturn(true);
 		try {
 			_api.executeUpdateObject(ls, "/", Collections.<String, String> emptyMap());
 		} finally {
@@ -241,6 +243,7 @@ public class NiciraNvpApiTest {
 		when(header.getValue()).thenReturn("text/html");
 		when(_method.getResponseHeader("Content-Type")).thenReturn(header);
 		when(_method.getResponseBodyAsString()).thenReturn("Off to timbuktu, won't be back later.");
+		when(_method.isRequestSent()).thenReturn(true);
 		try {
 			_api.executeDeleteObject("/");
 		} finally {
@@ -279,6 +282,7 @@ public class NiciraNvpApiTest {
 		when(header.getValue()).thenReturn("text/html");
 		when(_method.getResponseHeader("Content-Type")).thenReturn(header);
 		when(_method.getResponseBodyAsString()).thenReturn("Off to timbuktu, won't be back later.");
+		when(_method.isRequestSent()).thenReturn(true);
 		try {
 			_api.executeRetrieveObject(LogicalSwitch.class, "/", Collections.<String, String> emptyMap());
 		} finally {