/** Validate basic store return values. */
  public boolean testAStoreReturnedSystemRecord() {
    if (!setupOK) addTag(Tag.MISSINGDEP, "failed some dependency");
    addTag(Tag.SMOKE);
    addTag(Tag.REGRESSION);
    addTag(Tag.QUICK);
    addTag(Tag.SMOKE);
    addTag(HoneycombTag.EMULATOR);

    addBug(
        "6187594",
        "client API isn't returning data hash; "
            + "can't query on data hash (md hash not supported by design)");

    addBug(
        "6216444",
        "On successful store or storeMetadata, "
            + "SystemRecord.getDigestAlgorithm() returns null");

    if (excludeCase()) return false;

    String errors = HoneycombTestClient.validateSystemRecord(storeResult.sr, getFilesize());
    if (!errors.equals("")) {
      Log.ERROR("Test failed for the following reasons: " + errors);
      return (false);
    }

    Log.INFO("Successfully verified the return result from store");
    return (true);
  }
示例#2
0
  public CmdResult addMetadata(int client, String oid, HashMap mdMap)
      throws HoneycombTestException {

    Log.DEBUG("Attempting to add metadata " + mdMap + " to " + oid);
    CmdResult cr = testBed.addMetadata(client, oid, mdMap);
    Log.INFO("OID returned from addMetadata: " + cr.mdoid);

    return cr;
  }
  /** Store a file. */
  public void setUp() throws Throwable {
    Log.DEBUG(this.getClass().getName() + "::setUp() called");

    super.setUp();

    setFilesize(HoneycombTestConstants.DEFAULT_FILESIZE_SMALL);

    doStoreTestNow();
  }
示例#4
0
 public void setUp() throws Throwable {
   Log.DEBUG("com.sun.honeycomb.test.HoneycombRMISuite::setUp() called");
   super.setUp();
   //
   //  the basic requirement of a HoneycombRMISuite is that
   //      the TestBed has clients
   //
   if (testBed.clientCount() == 0) {
     throw new HoneycombTestException("Clients and cluster must be defined.");
   }
 }
  /** Retrieve a file. */
  public boolean testBRetrieveAfterStore() {
    if (!setupOK) addTag(Tag.MISSINGDEP, "failed some dependency");
    addTag(Tag.SMOKE);
    addTag(Tag.REGRESSION);
    addTag(Tag.QUICK);
    addTag(Tag.SMOKE);
    addTag(HoneycombTag.RETRIEVEDATA);
    addTag(HoneycombTag.JAVA_API);
    addTag(HoneycombTag.EMULATOR);

    if (excludeCase()) return false;

    CmdResult cr;
    try {
      cr = retrieve(storeResult.mdoid);
      Log.INFO(
          "Retrieved oid "
              + storeResult.mdoid
              + " @ "
              + (cr.filesize * 1000 / cr.time)
              + " bytes/sec");
    } catch (HoneycombTestException hte) {
      Log.ERROR("Retrieve failed [oid " + storeResult.mdoid + "]: " + hte.getMessage());
      Log.DEBUG(Log.stackTrace(hte));
      return (false);
    }

    if (TestBed.doHash) {
      try {
        verifyFilesMatch(storeResult, cr);
        Log.INFO("Retrieved file matched stored file");
      } catch (HoneycombTestException hte) {
        Log.ERROR("verifyFilesMatch failed: " + hte.getMessage());
        return (false);
      }
    } else Log.INFO("skipping hash check");

    return (true);
  }
示例#6
0
 public CmdResult delete(int client, String oid) throws HoneycombTestException {
   Log.DEBUG("Attempting a delete of oid " + oid);
   return testBed.delete(client, oid);
 }
示例#7
0
 public CmdResult query(int client, String q, int n) throws HoneycombTestException {
   Log.DEBUG("Attempting a query of " + q + ", with max results " + n);
   return testBed.query(client, q, n);
 }
示例#8
0
 public CmdResult query(int client, String q) throws HoneycombTestException {
   Log.DEBUG("Attempting a query of " + q);
   return testBed.query(client, q);
 }
示例#9
0
 public CmdResult retrieve(int client, String oid) throws HoneycombTestException {
   Log.INFO("Retrieving " + oid);
   return testBed.retrieve(client, oid);
 }
示例#10
0
 public void tearDown() throws Throwable {
   Log.DEBUG(this.getClass().getName() + "::tearDown() called");
   super.tearDown();
 }