Mark a live test as not enabled (needs investigation), change comment line

This commit is contained in:
Jason King 2011-10-03 22:40:02 +01:00
parent c674bdb1b3
commit 0dc804f4a7
2 changed files with 11 additions and 6 deletions

View File

@ -142,7 +142,7 @@ public class VirtualGuestToNodeMetadata implements Function<VirtualGuest, NodeMe
Iterable<ProductItem> items = Iterables.transform(order.getPrices(),ProductItems.item());
return new ProductItemsToHardware().apply(Sets.newLinkedHashSet(items));
} catch (HttpResponseException e) {
//For singapore
//Shouldn't happen any more - was blowing up in Singapore
return null;
}
}
@ -167,7 +167,7 @@ public class VirtualGuestToNodeMetadata implements Function<VirtualGuest, NodeMe
ProductItem os = Iterables.find(items, ProductItemPredicates.categoryCode("os"));
return new ProductItemToImage().apply(os);
} catch (HttpResponseException e) {
//For singapore
//Shouldn't happen any more - was blowing up in Singapore
return null;
}
}

View File

@ -66,9 +66,11 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
}
}
@Test
@Test(enabled = false)
public void testCancelAndPlaceOrder() {
// This method was not working needs testing out.
// TODO: Should also check if there are active transactions before trying to cancel.
// objectMask: virtualGuests.activeTransaction
for( VirtualGuest guest: client.listVirtualGuests()) {
@ -108,10 +110,8 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
.hostname(TEST_HOSTNAME_PREFIX+new Random().nextInt())
.build();
String location = ""+Iterables.get(productPackage.getDatacenters(),0).getId();
ProductOrder order = ProductOrder.builder()
.packageId(pkgId)
.location(location)
.quantity(1)
.useHourlyPricing(true)
.prices(prices)
@ -119,10 +119,15 @@ public class VirtualGuestClientLiveTest extends BaseSoftLayerClientLiveTest {
.build();
ProductOrderReceipt receipt = context.getApi().getVirtualGuestClient().orderVirtualGuest(order);
ProductOrder order2 = receipt.getOrderDetails();
VirtualGuest result = Iterables.get(order2.getVirtualGuests(), 0);
ProductOrder order3 = context.getApi().getVirtualGuestClient().getOrderTemplate(result.getId());
assertEquals(order.getPrices(),order3.getPrices());
assertNotNull(receipt);
}
private void checkVirtualGuest(VirtualGuest vg) {
if (vg.getBillingItemId()==-1) return;//Quotes and shutting down guests