Exemplo n.º 1
0
  /** Run the metadata test to see if it discovers any errors. */
  public boolean testMetadata() throws Throwable {
    addTag(Tag.POSITIVE);
    addTag(HoneycombTag.QUERY);
    addTag(HoneycombTag.JAVA_API);
    // addTag(Tag.QUICK);
    // addTag(Tag.REGRESSION);
    // addTag(Tag.SMOKE);
    if (excludeCase()) return false;

    TestMetadata Metadata = new TestMetadata();
    String args[] = {"-s", testBed.getDataVIP(), "-p", "" + testBed.getDataPort(), "-T"};
    try {
      Metadata.main(args);
    } catch (HoneycombTestException hte) {
      // Look at the exception message to see if it passed or failed
      String rc = hte.getMessage();
      Log.DEBUG("Result is " + rc);
      if (!rc.equals(TestRun.PASS)) {
        Log.ERROR("Test failed...see stdout");
        return (false);
      }
    }

    return (true);
  }