mirror of https://github.com/apache/jclouds.git
Override setupContext and tearDownContext to avoid ordering issues when running live tests
This commit is contained in:
parent
6b257340eb
commit
98787ecc00
|
@ -37,8 +37,10 @@ public class AccountLiveTest extends BaseAbiquoLiveApiTest {
|
|||
|
||||
private Enterprise enterprise;
|
||||
|
||||
@BeforeClass(groups = "live")
|
||||
public void setup() {
|
||||
@BeforeClass(groups = { "integration", "live" })
|
||||
@Override
|
||||
public void setupContext() {
|
||||
super.setupContext();
|
||||
enterprise = view.getAdministrationService().getCurrentEnterprise();
|
||||
}
|
||||
|
||||
|
|
|
@ -58,8 +58,10 @@ public class VirtualApplianceLiveTest extends BaseAbiquoLiveApiTest {
|
|||
|
||||
private MonitoringService monitoringService;
|
||||
|
||||
@BeforeClass(groups = "live")
|
||||
public void setup() {
|
||||
@BeforeClass(groups = { "integration", "live" })
|
||||
@Override
|
||||
public void setupContext() {
|
||||
super.setupContext();
|
||||
monitoringService = view.getMonitoringService();
|
||||
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
||||
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
||||
|
|
|
@ -67,8 +67,10 @@ public class VirtualMachineLiveTest extends BaseAbiquoLiveApiTest {
|
|||
|
||||
private MonitoringService monitoringService;
|
||||
|
||||
@BeforeClass(groups = "live")
|
||||
public void setup() {
|
||||
@BeforeClass(groups = { "integration", "live" })
|
||||
@Override
|
||||
public void setupContext() {
|
||||
super.setupContext();
|
||||
monitoringService = view.getMonitoringService();
|
||||
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
||||
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
||||
|
@ -78,9 +80,11 @@ public class VirtualMachineLiveTest extends BaseAbiquoLiveApiTest {
|
|||
assertNotNull(vapp.getId());
|
||||
}
|
||||
|
||||
@AfterClass(groups = "live")
|
||||
public void tearDown() {
|
||||
@AfterClass(groups = { "integration", "live" })
|
||||
@Override
|
||||
protected void tearDownContext() {
|
||||
vapp.delete();
|
||||
super.tearDownContext();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue