From bacafb98dcd8f5428e6d00e8e75f0c5c360ca97a Mon Sep 17 00:00:00 2001 From: Victor Galkin Date: Tue, 26 Apr 2011 18:19:12 +0400 Subject: [PATCH] Fix for support maven surefire plugin test runner --- .../jclouds/openstack/nova/live/compute/ComputeBase.java | 2 +- .../nova/live/compute/NovaComputeServiceLiveTest.java | 7 +++++-- .../nova/live/compute/ServiceActionsLiveTest.java | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ComputeBase.java b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ComputeBase.java index 98e092bdf2..fbc561e9f3 100644 --- a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ComputeBase.java +++ b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ComputeBase.java @@ -53,7 +53,7 @@ public class ComputeBase { protected Properties overrides; @BeforeTest - public void setupClient() throws InterruptedException, ExecutionException, TimeoutException, IOException { + public void before() throws InterruptedException, ExecutionException, TimeoutException, IOException { Properties properties = setupProperties(this.getClass()); setupOverrides(properties); overrides = properties; diff --git a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java index 0229bdd735..db444d1e82 100644 --- a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java +++ b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/NovaComputeServiceLiveTest.java @@ -69,7 +69,7 @@ import static org.testng.Assert.*; @Test(groups = "novalive", enabled = true, sequential = true) public class NovaComputeServiceLiveTest extends ComputeBase { - private String group = "compute service test group"; + private static String group = "compute service test group"; protected void checkNodes(Iterable nodes, String tag) throws IOException { @@ -91,8 +91,11 @@ public class NovaComputeServiceLiveTest extends ComputeBase { } } + @BeforeTest - public void before() { + @Override + public void before() throws IOException, ExecutionException, TimeoutException, InterruptedException { + super.before(); computeService.destroyNodesMatching(inGroup(group)); } diff --git a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java index 2fdf62bb17..9b50d262cc 100644 --- a/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java +++ b/sandbox-apis/nova/src/test/java/org/jclouds/openstack/nova/live/compute/ServiceActionsLiveTest.java @@ -18,7 +18,7 @@ import static org.jclouds.compute.predicates.NodePredicates.inGroup; */ public class ServiceActionsLiveTest extends ComputeBase { - private String group = "ServiceActionsLiveTest"; + static private String group = "ServiceActionsLiveTest"; @Test public void testReboot() throws Exception {