use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.
the class KinesisDatastoreDefinitionTest method testRuntimeInfo.
/**
* Check {@link KinesisDatastoreDefinition#getRuntimeInfo(KinesisDatastoreProperties) returns RuntimeInfo,
* which runtime class name is "org.talend.components.kinesis.runtime.KinesisDatastoreRuntime"
*/
@Test
@Ignore("This can't work unless the runtime jar is already installed in maven!")
public void testRuntimeInfo() {
RuntimeInfo runtimeInfo = datastoreDefinition.getRuntimeInfo(null);
assertEquals("org.talend.components.kinesis.runtime.KinesisDatastoreRuntime", runtimeInfo.getRuntimeClassName());
}
use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.
the class KinesisInputDefinitionTest method testRuntimeInfo.
@Test
@Ignore("This can't work unless the runtime jar is already installed in maven!")
public void testRuntimeInfo() {
RuntimeInfo runtimeInfo = inputDefinition.getRuntimeInfo(ExecutionEngine.BEAM, null, null);
assertEquals("org.talend.components.kinesis.runtime.KinesisInputRuntime", runtimeInfo.getRuntimeClassName());
}
use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.
the class KinesisDatastoreRuntimeTestIT method doHealthChecks.
@Test
public void doHealthChecks() {
KinesisDatastoreProperties props = getDatastore();
RuntimeInfo ri = def.getRuntimeInfo(props);
try (SandboxedInstance si = RuntimeUtil.createRuntimeClass(ri, getClass().getClassLoader())) {
DatastoreRuntime runtime = (DatastoreRuntime) si.getInstance();
runtime.initialize(null, props);
Iterable<ValidationResult> validationResults = runtime.doHealthChecks(null);
Assert.assertEquals(ValidationResult.OK, validationResults.iterator().next());
// Wrong access key
{
KinesisDatastoreProperties wrongAccess = getDatastore();
wrongAccess.accessKey.setValue("wrong");
runtime.initialize(null, wrongAccess);
validationResults = runtime.doHealthChecks(null);
Assert.assertEquals(ValidationResult.Result.ERROR, validationResults.iterator().next().getStatus());
}
// Wrong screct key
{
KinesisDatastoreProperties wrongSecret = getDatastore();
wrongSecret.secretKey.setValue("wrong");
runtime.initialize(null, wrongSecret);
validationResults = runtime.doHealthChecks(null);
Assert.assertEquals(ValidationResult.Result.ERROR, validationResults.iterator().next().getStatus());
}
}
}
use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.
the class FixedDatasetDefinitionTest method testRuntimeInfo.
/**
* Checks the {@link RuntimeInfo} of the definition.
*/
@Test
public void testRuntimeInfo() {
RuntimeInfo runtimeInfo = def.getRuntimeInfo(null);
assertThat(runtimeInfo.getRuntimeClassName(), is("org.talend.components.localio.runtime.fixed.FixedDatasetRuntime"));
// Other runtime information is not available until the runtime module is built and installed.
}
use of org.talend.daikon.runtime.RuntimeInfo in project components by Talend.
the class FixedFlowInputDefinitionTest method testGetRuntimeInfo.
@Test
public void testGetRuntimeInfo() {
RuntimeInfo runtimeInfo = definition.getRuntimeInfo(ExecutionEngine.BEAM, null, ConnectorTopology.OUTGOING);
assertEquals("org.talend.components.localio.runtime.fixedflowinput.FixedFlowInputRuntime", runtimeInfo.getRuntimeClassName());
}
Aggregations