@BeforeMethod(alwaysRun = true) @Override public void setUp() throws Exception { super.setUp(); jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(AWS_EC2_LOCATION_SPEC); }
@AfterMethod(alwaysRun = true) @Override public void tearDown() throws Exception { try { super.tearDown(); } finally { if (context != null) context.close(); } }
@BeforeMethod(alwaysRun = true) @Override public void setUp() throws Exception { super.setUp(); jcloudsLocation = (JcloudsLocation) managementContext.getLocationRegistry().resolve(LOCATION_SPEC); context = ContextBuilder.newBuilder(PROVIDER) .modules(Arrays.asList(new SshjSshClientModule(), new SLF4JLoggingModule())) .credentials(jcloudsLocation.getIdentity(), jcloudsLocation.getCredential()) .build(ComputeServiceContext.class); }