From 1d886305bafb5bcabdc5e7f78c4da524fb4fb09e Mon Sep 17 00:00:00 2001 From: Andrew Donald Kennedy Date: Thu, 22 Mar 2012 13:01:06 +0000 Subject: [PATCH] Issue 830: Make live test before methods always run --- .../director/v1_5/VCloudDirectorClientExperimentLiveTest.java | 2 +- .../director/v1_5/features/AbstractVAppClientLiveTest.java | 4 ++-- .../director/v1_5/features/AdminCatalogClientLiveTest.java | 2 +- .../director/v1_5/features/AdminNetworkClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/AdminOrgClientLiveTest.java | 2 +- .../director/v1_5/features/AdminQueryClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/AdminVdcClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/GroupClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/MediaClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/NetworkClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/OrgClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/QueryClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/TaskClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/UploadClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/UserClientLiveTest.java | 2 +- .../vcloud/director/v1_5/features/VdcClientLiveTest.java | 2 +- .../v1_5/internal/BaseVCloudDirectorClientLiveTest.java | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorClientExperimentLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorClientExperimentLiveTest.java index 07bba81c1d..a6d5c931b6 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorClientExperimentLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/VCloudDirectorClientExperimentLiveTest.java @@ -43,7 +43,7 @@ public class VCloudDirectorClientExperimentLiveTest extends BaseVCloudDirectorCl * @see BaseVCloudDirectorClientLiveTest#setupRequiredClients() */ @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { } } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AbstractVAppClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AbstractVAppClientLiveTest.java index d74fc8ef74..e866c8c13e 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AbstractVAppClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AbstractVAppClientLiveTest.java @@ -101,7 +101,7 @@ public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClien * * @see BaseVCloudDirectorClientLiveTest#setupRequiredClients() */ - @BeforeClass(inheritGroups = true, description = "Retrieves the required clients from the REST API context") + @BeforeClass(alwaysRun = true, description = "Retrieves the required clients from the REST API context") @Override protected void setupRequiredClients() { assertNotNull(context.getApi()); @@ -119,7 +119,7 @@ public abstract class AbstractVAppClientLiveTest extends BaseVCloudDirectorClien * Retrieves the test {@link Vdc} and {@link VAppTemplate} from their configured {@link URI}s. * Instantiates a new test VApp. */ - @BeforeClass(alwaysRun = true, description = "Sets up the environment") + @BeforeClass(alwaysRun = true, description = "Sets up the environment", dependsOnMethods = { "setupRequiredClients" }) protected void setupEnvironment() { // Get the configured Vdc for the tests vdc = vdcClient.getVdc(vdcURI); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java index 06bc0300b7..4fce8d7a7f 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminCatalogClientLiveTest.java @@ -71,7 +71,7 @@ public class AdminCatalogClientLiveTest extends BaseVCloudDirectorClientLiveTest private Owner owner; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) protected void setupRequiredClients() { catalogClient = context.getApi().getAdminCatalogClient(); orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java index c5c6d9eee2..b51db728c1 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminNetworkClientLiveTest.java @@ -65,7 +65,7 @@ public class AdminNetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest Network network; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) protected void setupRequiredClients() { networkClient = context.getApi().getAdminNetworkClient(); networkRef = Reference.builder().href(networkURI).build().toAdminReference(endpoint); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java index 68a40bcf2c..4acc38871e 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminOrgClientLiveTest.java @@ -70,7 +70,7 @@ public class AdminOrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { private OrgVAppTemplateLeaseSettings vAppTemplateLeaseSettings; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { orgClient = context.getApi().getAdminOrgClient(); orgRef = Iterables.getFirst(orgClient.getOrgList().getOrgs(), null).toAdminReference(endpoint); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java index dbe5ba7f08..cf49f5ede7 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminQueryClientLiveTest.java @@ -49,7 +49,7 @@ public class AdminQueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { private AdminQueryClient queryClient; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { queryClient = context.getApi().getAdminQueryClient(); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java index 5b967def7d..7eb335c44c 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/AdminVdcClientLiveTest.java @@ -60,7 +60,7 @@ public class AdminVdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { private String metadataValue; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { vdcClient = context.getApi().getAdminVdcClient(); metadataClient = vdcClient.getMetadataClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java index caa7495d62..0ae2532465 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/GroupClientLiveTest.java @@ -54,7 +54,7 @@ public class GroupClientLiveTest extends BaseVCloudDirectorClientLiveTest { private Group group; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { groupClient = context.getApi().getGroupClient(); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java index 49a140ac12..5c276b3837 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/MediaClientLiveTest.java @@ -89,7 +89,7 @@ public class MediaClientLiveTest extends BaseVCloudDirectorClientLiveTest { protected MediaClient mediaClient; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { vdcClient = context.getApi().getVdcClient(); mediaClient = context.getApi().getMediaClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java index 1b14bb18f1..21100a6410 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/NetworkClientLiveTest.java @@ -59,7 +59,7 @@ public class NetworkClientLiveTest extends BaseVCloudDirectorClientLiveTest { protected NetworkClient networkClient; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { networkClient = context.getApi().getNetworkClient(); context.getApi().getAdminNetworkClient().getMetadataClient().setMetadata(toAdminUri(networkURI), diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java index 2ea94a3749..6e38baac2f 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/OrgClientLiveTest.java @@ -61,7 +61,7 @@ public class OrgClientLiveTest extends BaseVCloudDirectorClientLiveTest { private OrgClient orgClient; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { orgClient = context.getApi().getOrgClient(); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java index 2206dc7a99..a5b0555e02 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/QueryClientLiveTest.java @@ -77,7 +77,7 @@ public class QueryClientLiveTest extends BaseVCloudDirectorClientLiveTest { } @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { queryClient = context.getApi().getQueryClient(); vAppTemplateClient = context.getApi().getVAppTemplateClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java index 504baf3079..7a21f2d0c6 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/TaskClientLiveTest.java @@ -66,7 +66,7 @@ public class TaskClientLiveTest extends BaseVCloudDirectorClientLiveTest { private VApp vApp; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { orgClient = context.getApi().getOrgClient(); taskClient = context.getApi().getTaskClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java index 5ac87998b4..307c75d662 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UploadClientLiveTest.java @@ -38,7 +38,7 @@ public class UploadClientLiveTest extends BaseVCloudDirectorClientLiveTest { protected UploadClient uploadClient; @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { uploadClient = context.getApi().getUploadClient(); } diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java index 3e46f80587..442c9b8167 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/UserClientLiveTest.java @@ -72,7 +72,7 @@ public class UserClientLiveTest extends BaseVCloudDirectorClientLiveTest { private static Random random = new Random(); @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { userClient = context.getApi().getUserClient(); orgRef = Iterables.getFirst(context.getApi().getOrgClient().getOrgList().getOrgs(), null).toAdminReference(endpoint); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java index 3663e6581f..343f2ccf79 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/VdcClientLiveTest.java @@ -110,7 +110,7 @@ public class VdcClientLiveTest extends BaseVCloudDirectorClientLiveTest { } @Override - @BeforeClass(inheritGroups = true) + @BeforeClass(alwaysRun = true) public void setupRequiredClients() { vdcClient = context.getApi().getVdcClient(); vappTemplateClient = context.getApi().getVAppTemplateClient(); diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java index a23563d9ff..7a626a8f37 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorClientLiveTest.java @@ -130,7 +130,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ protected static DateService dateService; - @BeforeGroups("live") + @BeforeGroups(alwaysRun = true) protected static void setupDateService() { dateService = Guice.createInjector().getInstance(DateService.class); assertNotNull(dateService); @@ -149,7 +149,7 @@ public abstract class BaseVCloudDirectorClientLiveTest extends BaseVersionedServ retryTaskSuccessLong = new RetryablePredicate(taskSuccess, LONG_TASK_TIMEOUT_SECONDS * 1000L); } - @BeforeClass(groups = { "live" }) + @BeforeClass(alwaysRun = true) protected void setupContext() throws Exception { setupCredentials(); Properties overrides = setupProperties();