Package com.splout.db.common

Examples of com.splout.db.common.SploutConfiguration


    }
  }

  @Test
  public void testDeployTimeout() throws Throwable {
    SploutConfiguration testConfig = SploutConfiguration.getTestConfig();
    // Set deploy timeout to something very low
    testConfig.setProperty(DNodeProperties.DEPLOY_TIMEOUT_SECONDS, 1);
    //
    DNodeHandler dHandler = new DNodeHandler(new Fetcher(testConfig) {
     
      @Override
      public File fetch(String uriStr, Reporter reporter) throws IOException, URISyntaxException {
        try {
          Thread.sleep(5000);
          return null;
        } catch(InterruptedException e) {
          throw new IOException(e);
        }
      }
    });
    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, "dnode-" + this.getClass().getName() + "-1");
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));

    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace3");
      deploy.setDataURI("file:///foo");
View Full Code Here


  @Test
  public void testPoolCacheEviction() throws Throwable {
    TestUtils.createFooDatabase(DB_1 + ".1", 1, "foo1");
    TestUtils.createFooDatabase(DB_2 + ".1", 2, "foo2");

    SploutConfiguration testConfig = SploutConfiguration.getTestConfig();
    // Set cache eviction to something quite low
    testConfig.setProperty(DNodeProperties.EH_CACHE_SECONDS, 1);
    //
    DNodeHandler dHandler = new DNodeHandler();
    DNode dnode = TestUtils.getTestDNode(testConfig, dHandler, "dnode-" + this.getClass().getName() + "-2");
    //
    DNodeService.Client client = DNodeClient.get("localhost", testConfig.getInt(DNodeProperties.PORT));

    try {
      DeployAction deploy = new DeployAction();
      deploy.setTablespace("tablespace1");
      deploy.setDataURI(new File(DB_1 + ".1", "foo.db").toURI().toString());
View Full Code Here

  @Ignore // Persistence now being handled outside Hazelcast, this test may be removed
  public void test() throws HazelcastConfigBuilderException, InterruptedException {
    try {
      assertFalse(new File(PERSISTENCE_FOLDER).exists());

      SploutConfiguration config = SploutConfiguration.getTestConfig();
      config.setProperty(HazelcastProperties.HZ_PERSISTENCE_FOLDER, PERSISTENCE_FOLDER);
      HazelcastInstance hz = Hazelcast.newHazelcastInstance(HazelcastConfigBuilder.build(config));

      CoordinationStructures str = new CoordinationStructures(hz);
      str.getVersionsBeingServed().put("foo1", new HashMap<String, Long>());
      str.getVersionsBeingServed().put("foo2", new HashMap<String, Long>());
View Full Code Here

TOP

Related Classes of com.splout.db.common.SploutConfiguration

Copyright © 2018 www.massapicom. 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.