Search in sources :

Example 1 with JDBCDatastoreRuntime

use of org.talend.components.jdbc.runtime.dataprep.JDBCDatastoreRuntime in project components by Talend.

the class JDBCDatasetTestIT method testDoHealthChecks.

@Test
public void testDoHealthChecks() {
    JDBCDatasetProperties dataset = createDatasetProperties(true);
    JDBCDatastoreRuntime runtime = new JDBCDatastoreRuntime();
    runtime.initialize(null, dataset.getDatastoreProperties());
    Iterable<ValidationResult> result = runtime.doHealthChecks(null);
    Assert.assertNotNull(result);
    Iterator<ValidationResult> iterator = result.iterator();
    Assert.assertTrue(iterator.hasNext());
    Assert.assertEquals(ValidationResult.Result.OK, iterator.next().getStatus());
}
Also used : JDBCDatasetProperties(org.talend.components.jdbc.dataset.JDBCDatasetProperties) ValidationResult(org.talend.daikon.properties.ValidationResult) JDBCDatastoreRuntime(org.talend.components.jdbc.runtime.dataprep.JDBCDatastoreRuntime) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 JDBCDatasetProperties (org.talend.components.jdbc.dataset.JDBCDatasetProperties)1 JDBCDatastoreRuntime (org.talend.components.jdbc.runtime.dataprep.JDBCDatastoreRuntime)1 ValidationResult (org.talend.daikon.properties.ValidationResult)1