}
}
@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");