Package com.pardot.rhombus

Examples of com.pardot.rhombus.ConnectionManager.teardown()


    //now test the count function
    long count = om.count("object2", criteria);
    assertEquals((nDataItems / 3) - 10, count);

    cm.teardown();
  }

  @Test
  public void testStartEndUuidsInCriteria() throws Exception {
    logger.debug("Starting testLargeCountWithStartEndUuidsInCriteria");
View Full Code Here


    criteria.setLimit(pageSize + 1);

    dbObjects = om.list("object2", criteria);
    assertEquals(pageSize, dbObjects.size());

    cm.teardown();
  }

  @Test
  public void testMultiInsert() throws Exception {
    logger.debug("Starting testMultiInsert");
View Full Code Here

    }
    //now test the count function too
    long count = om.count("object2", criteria);
    assertEquals(4, count);

    cm.teardown();
  }

  @Test
  public void testVisitAllEntries() throws Exception {
    logger.debug("Starting testVisitAllEntries");
View Full Code Here

    long syncTime = end - start;

    System.out.println("Visiting all objects took " + syncTime + "ms");
    assertEquals(20000, visitor.getCount());

    cm.teardown();
  }


  @Test
  public void testTruncateKeyspace() throws Exception {
View Full Code Here

    // Make sure it is there
    returnedObject = om.getByKey("testtype", key);
    assertNotNull(returnedObject);

    cm.teardown();
  }
}
View Full Code Here

    for(VisitorTester visitor : visitorFactory.getInstances()) {
      totalCount += visitor.getObjectCount();
    }

    assertEquals(20l, totalCount);
    cm.teardown();
  }

  @Test
  public void testFourPartitions() throws Exception {
    String objectType = "simple";
View Full Code Here

    assertEquals(valueCount, totalCount);

    this.verifySavepoints(numPartitions, savepointDirectoryName, objectType, om, ranges);

    cm.teardown();
  }

  @Test
  public void testStartingFromSavepoint() throws Exception {
    String objectType = "simple";
View Full Code Here

    // The total number of visits we have will fluctuate depending on where the ids land among the token ranges, but we should be close to half
    assertTrue(Math.abs(actualCount - (valueCount/2)) < (valueCount/(numPartitions * 2)));

    this.verifySavepoints(numPartitions, savepointDirectoryName, objectType, om, ranges);

    cm.teardown();
  }

  private void verifySavepoints(Integer numPartitions, String savepointDirectoryName, String objectType, ObjectMapper om, List<Map.Entry<Long, Long>> ranges) throws Exception {
    // Open up the savepoint directory
    File savepointDirectory = new File(savepointDirectoryName);
View Full Code Here

    for(VisitorTester visitor : visitorFactory.getInstances()) {
      totalCount += visitor.getObjectCount();
    }

    assertEquals(insertNum, totalCount);
    cm.teardown();
  }

  public void insertNObjects(ObjectMapper om, long number, long batchSize) throws RhombusException, CQLGenerationException {
    if(number < batchSize) {
      batchSize = number;
View Full Code Here

    CKeyspaceDefinition keyspace = om.getKeyspaceDefinition_ONLY_FOR_TESTING();
    assertEquals("clifunctional", keyspace.getName());
    assertEquals(3, keyspace.getDefinitions().get("clitest").getFields().size());
    assertEquals(2, keyspace.getDefinitions().get("clitest").getIndexes().size());

    cm.teardown();
  }

  @Test
  public void testRunMigrationCLI() throws Exception {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.