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());
deploy.setPartition(0);
deploy.setVersion(1l);
deploy.setMetadata(new PartitionMetadata());
client.deploy(Arrays.asList(new DeployAction[] { deploy }), 1l);
Thread.sleep(1000);
waitForDeployToFinish(client);
Thread.sleep(200);
Assert.assertEquals(false, dHandler.lastDeployTimedout.get());
Assert.assertEquals(false, dHandler.deployInProgress.get() > 0);
client.sqlQuery("tablespace1", 1l, 0, "SELECT 1;");
Assert.assertEquals(dHandler.dbCache.getKeysWithExpiryCheck().size(), 1);
deploy = new DeployAction();
deploy.setTablespace("tablespace1");
deploy.setDataURI(new File(DB_2 + ".1", "foo.db").toURI().toString());
deploy.setPartition(0);
deploy.setVersion(2l);
deploy.setMetadata(new PartitionMetadata());
client.deploy(Arrays.asList(new DeployAction[] { deploy }), 2l);
Thread.sleep(1000);
waitForDeployToFinish(client);