Package com.pardot.rhombus

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


    assertNotNull(connectionManager);

    assertEquals(1,cassCluster.getMetadata().getAllHosts().size());
    assertEquals(cassCluster.getMetadata().getClusterName(), "Test Cluster");

    connectionManager.teardown();
  }

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


    //verify that we saved the keyspace definition in cassandra correctly
    CKeyspaceDefinition queriedDef = cm.hydrateLatestKeyspaceDefinitionFromCassandra(definition.getName());
    assertEquals(definition.getDefinitions().size(), queriedDef.getDefinitions().size());
    assertEquals(queriedDef.getDefinitions().get("testtype").getField("foreignid").getType(), CField.CDataType.BIGINT);

    cm.teardown();
  }

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

    //Select from the newly created table
    ObjectMapper om = cm.getObjectMapper(definition2);
    ResultSet rs = om.getCqlExecutor().executeSync(CQLStatement.make("SELECT * FROM testtype3cb23c7ffc4256283064bd5eae1886b4", "testtype"));
    assertEquals(0, rs.all().size());

    cm.teardown();
  }

  @Test
  public void testDropKeyspace() throws Exception {
    // Set up a connection manager and build the cluster and keyspace
View Full Code Here

      caught = true;
    }
    session.close();
    assertTrue(caught);

    cm.teardown();
  }

  @Test
  public void testRhombusKeyspaceCreatedIfNotExists() throws Exception {
    // Set up a connection manager
View Full Code Here

      counter++;
      rsIter.next();
    }
    assertEquals(2, counter);

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

    dbObjects = om.list("testtype", foreignIdAndFilteredCriteria);
    assertEquals(1, dbObjects.size());
    assertEquals(filteredKey, dbObjects.get(0).get("id"));

    //Teardown connections
    cm.teardown();
  }

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

    foreignIdCriteria.setIndexKeys(indexKeys);
    List<Map<String, Object>> dbObjects = om.list("testtype", foreignIdCriteria);
    assertEquals(1, dbObjects.size());

    //Teardown connections
    cm.teardown();
  }

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

    foreignIdCriteria.setIndexKeys(indexKeys);
    List<Map<String, Object>> dbObjects = om.list("testtype", foreignIdCriteria);
    assertEquals(1, dbObjects.size());

    //Teardown connections
    cm.teardown();
  }
}
View Full Code Here

    Map<String, Object> dbObject4 = om.getByKey("testtype", key6);
    // Yet the object created with key6 should be extant
    assertNotNull(dbObject4);

    //Teardown connections
    cm.teardown();
  }

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

    // Should be 185
    count = om.count("object2", criteria);
    assertEquals(numThatShouldRemain, count);

    cm.teardown();
  }

}
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.