use of org.pentaho.di.trans.TransExecutionConfiguration in project pentaho-kettle by pentaho.
the class DefaultRunConfigurationExecutorTest method testExecuteClusteredTrans.
@Test
public void testExecuteClusteredTrans() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName("Default Configuration");
defaultRunConfiguration.setLocal(false);
defaultRunConfiguration.setRemote(false);
defaultRunConfiguration.setClustered(true);
TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
defaultRunConfigurationExecutor.execute(defaultRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null);
assertTrue(transExecutionConfiguration.isExecutingClustered());
assertFalse(transExecutionConfiguration.isExecutingRemotely());
assertFalse(transExecutionConfiguration.isExecutingLocally());
}
use of org.pentaho.di.trans.TransExecutionConfiguration in project pentaho-kettle by pentaho.
the class DefaultRunConfigurationExecutorTest method testExecuteRemoteNotFoundTrans.
@Test
public void testExecuteRemoteNotFoundTrans() throws Exception {
DefaultRunConfiguration defaultRunConfiguration = new DefaultRunConfiguration();
defaultRunConfiguration.setName("Default Configuration");
defaultRunConfiguration.setLocal(false);
defaultRunConfiguration.setRemote(true);
defaultRunConfiguration.setServer("Test Server");
TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
doReturn(slaveServer).when(abstractMeta).findSlaveServer(null);
try {
defaultRunConfigurationExecutor.execute(defaultRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null);
fail();
} catch (KettleException e) {
// expected
}
}
use of org.pentaho.di.trans.TransExecutionConfiguration in project pentaho-kettle by pentaho.
the class SparkRunConfigurationExecutorTest method testWebSocketVersionExecute.
@Test
public void testWebSocketVersionExecute() {
SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
sparkRunConfiguration.setName("Spark Configuration");
sparkRunConfiguration.setSchema("http://");
sparkRunConfiguration.setUrl("127.0.0.2:8121");
TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
sparkRunConfigurationExecutor.execute(sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null);
verify(variableSpace).setVariable("engine", "remote");
verify(variableSpace).setVariable("engine.remote", "spark");
verify(variableSpace).setVariable("engine.host", "127.0.0.2");
verify(variableSpace).setVariable("engine.port", "8121");
}
use of org.pentaho.di.trans.TransExecutionConfiguration in project pentaho-kettle by pentaho.
the class SparkRunConfigurationExecutorTest method testWebSocketVersionExecuteNoPort.
@Test
public void testWebSocketVersionExecuteNoPort() {
SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
sparkRunConfiguration.setName("Spark Configuration");
doReturn("2.0").when(variableSpace).getVariable("KETTLE_AEL_PDI_DAEMON_VERSION", "2.0");
TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
sparkRunConfigurationExecutor.execute(sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null);
verify(variableSpace).setVariable("engine", "remote");
verify(variableSpace).setVariable("engine.remote", "spark");
verify(variableSpace).setVariable("engine.protocol", SparkRunConfigurationExecutor.DEFAULT_PROTOCOL);
verify(variableSpace).setVariable("engine.host", SparkRunConfigurationExecutor.DEFAULT_HOST);
verify(variableSpace).setVariable("engine.port", SparkRunConfigurationExecutor.DEFAULT_WEBSOCKET_PORT);
}
use of org.pentaho.di.trans.TransExecutionConfiguration in project pentaho-kettle by pentaho.
the class SparkRunConfigurationExecutorTest method testUrlWssWebSocketVersionExecute.
@Test
public void testUrlWssWebSocketVersionExecute() {
SparkRunConfiguration sparkRunConfiguration = new SparkRunConfiguration();
sparkRunConfiguration.setName("Spark Configuration");
sparkRunConfiguration.setSchema("http://");
sparkRunConfiguration.setUrl(" 127.0.0.2:8121 ");
TransExecutionConfiguration transExecutionConfiguration = new TransExecutionConfiguration();
sparkRunConfigurationExecutor.execute(sparkRunConfiguration, transExecutionConfiguration, abstractMeta, variableSpace, null);
verify(variableSpace).setVariable("engine.protocol", "http");
verify(variableSpace).setVariable("engine.host", "127.0.0.2");
verify(variableSpace).setVariable("engine.port", "8121");
}
Aggregations