예제 #1
0
  private void doStoreTestNow() throws HoneycombTestException {
    TestCase self = createTestCase("setupStore", "filesize=" + getFilesize());
    self.addTag(Tag.SMOKE);
    self.addTag(Tag.REGRESSION);
    self.addTag(Tag.POSITIVE);
    self.addTag(Tag.SMOKE);
    self.addTag(HoneycombTag.STOREDATA);
    self.addTag(HoneycombTag.JAVA_API);
    self.addTag(HoneycombTag.EMULATOR);

    if (self.excludeCase()) return;

    storeResult = store(getFilesize());

    // successful result will only be posted if we didn't throw
    self.testPassed(
        "Stored file of size "
            + getFilesize()
            + " as oid "
            + storeResult.mdoid
            + " @ "
            + (storeResult.filesize * 1000 / storeResult.time)
            + " bytes/sec");
    setupOK = true;
  }
예제 #2
0
  public void setUp() throws Throwable {
    Log.DEBUG("WebDAVFilenames.setUp() called");
    super.setUp();

    TestCase skip = createTestCase("WebDAVFilenames", "Test virtual view filenames.");
    skip.addTag(HoneycombTag.WEBDAV);
    skip.addTag(HoneycombTag.EMULATOR);
    skip.addTag(Tag.REGRESSION);
    skip.addTag(Tag.SMOKE);
    skip.addTag(Tag.UNIT);
    skip.addTag(Tag.QUICK);
    if (skip.excludeCase()) // should I run?
    return;

    vip = testBed.getDataVIP();
    port = testBed.getDataPort();

    try {
      api = new NameValueObjectArchive(vip, port);
    } catch (Exception e) {
      e.printStackTrace();
      TestCase self = createTestCase("WebDAV", "getAPIConnection");
      self.testFailed("Couldn't get API connection: " + e);
      return;
    }

    try {
      dav = new WebDAVer(vip + ":" + port);
      // Make sure the view exists
      if (!dav.exists("/webdav/davtestFnames/")) {
        Log.ERROR("No view \"davtestFnames\" -- check schema.");
        dav = null;
      }
    } catch (Exception e) {
      e.printStackTrace();
    }

    if (dav == null) {
      TestCase self = createTestCase("WebDAV", "getDAVConnection");
      self.testFailed("Failed to get webdav connection");
    }
  }