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;
|
private Enterprise enterprise;
|
||||||
|
|
||||||
@BeforeClass(groups = "live")
|
@BeforeClass(groups = { "integration", "live" })
|
||||||
public void setup() {
|
@Override
|
||||||
|
public void setupContext() {
|
||||||
|
super.setupContext();
|
||||||
enterprise = view.getAdministrationService().getCurrentEnterprise();
|
enterprise = view.getAdministrationService().getCurrentEnterprise();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -58,8 +58,10 @@ public class VirtualApplianceLiveTest extends BaseAbiquoLiveApiTest {
|
||||||
|
|
||||||
private MonitoringService monitoringService;
|
private MonitoringService monitoringService;
|
||||||
|
|
||||||
@BeforeClass(groups = "live")
|
@BeforeClass(groups = { "integration", "live" })
|
||||||
public void setup() {
|
@Override
|
||||||
|
public void setupContext() {
|
||||||
|
super.setupContext();
|
||||||
monitoringService = view.getMonitoringService();
|
monitoringService = view.getMonitoringService();
|
||||||
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
||||||
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
||||||
|
|
|
@ -67,8 +67,10 @@ public class VirtualMachineLiveTest extends BaseAbiquoLiveApiTest {
|
||||||
|
|
||||||
private MonitoringService monitoringService;
|
private MonitoringService monitoringService;
|
||||||
|
|
||||||
@BeforeClass(groups = "live")
|
@BeforeClass(groups = { "integration", "live" })
|
||||||
public void setup() {
|
@Override
|
||||||
|
public void setupContext() {
|
||||||
|
super.setupContext();
|
||||||
monitoringService = view.getMonitoringService();
|
monitoringService = view.getMonitoringService();
|
||||||
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
vdc = getLast(view.getCloudService().listVirtualDatacenters());
|
||||||
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
vmt = templateBySize().min(vdc.listAvailableTemplates());
|
||||||
|
@ -78,9 +80,11 @@ public class VirtualMachineLiveTest extends BaseAbiquoLiveApiTest {
|
||||||
assertNotNull(vapp.getId());
|
assertNotNull(vapp.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass(groups = "live")
|
@AfterClass(groups = { "integration", "live" })
|
||||||
public void tearDown() {
|
@Override
|
||||||
|
protected void tearDownContext() {
|
||||||
vapp.delete();
|
vapp.delete();
|
||||||
|
super.tearDownContext();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue