Beispiel #1
0
  @BeforeClass(groups = {"integration", "live"})
  public void setup() {
    super.setup();
    testDomain = identity.toLowerCase() + "-domain.jclouds.org";
    domainApi = api.getDomainApi();
    domainCounter =
        retry(
            new Predicate<Integer>() {
              public boolean apply(Integer value) {
                return domainApi.list().size() == value.intValue();
              }
            },
            30,
            1,
            SECONDS);
    recordCounter =
        retry(
            new Predicate<Integer>() {
              public boolean apply(Integer value) {
                return domainApi.listRecords(testDomain).size() == value.intValue();
              }
            },
            30,
            1,
            SECONDS);

    try {
      domainApi.delete(testDomain);
    } catch (Exception ex) {
    }

    createDomain(testDomain);
  }
Beispiel #2
0
  @AfterClass(groups = {"integration", "live"})
  public void tearDown() {
    int before = domainApi.list().size();
    domainApi.delete(testDomain);
    assertTrue(domainCounter.apply(before - 1));

    super.tearDown();
  }