Search in sources :

Example 21 with DataSourceDeploymentInfo

use of org.kie.workbench.common.screens.datasource.management.model.DataSourceDeploymentInfo in project kie-wb-common by kiegroup.

the class AbstractDefChangeHandlerTest method verifyUnDeployed.

/**
 * Verifies that the given definition has been un-deployed.
 */
protected void verifyUnDeployed(Def def) throws Exception {
    // the definition should have been un-deployed.
    if (def instanceof DataSourceDef) {
        DataSourceDeploymentInfo deploymentInfo = runtimeManager.getDataSourceDeploymentInfo(def.getUuid());
        // is deployed by construction
        assertNotNull(deploymentInfo);
        verify(runtimeManager, times(1)).unDeployDataSource(deploymentInfo, UnDeploymentOptions.forcedUnDeployment());
    } else {
        DriverDeploymentInfo deploymentInfo = runtimeManager.getDriverDeploymentInfo(def.getUuid());
        // is deployed by construction
        assertNotNull(deploymentInfo);
        verify(runtimeManager, times(1)).unDeployDriver(deploymentInfo, UnDeploymentOptions.forcedUnDeployment());
    }
}
Also used : DriverDeploymentInfo(org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo) DataSourceDef(org.kie.workbench.common.screens.datasource.management.model.DataSourceDef) DataSourceDeploymentInfo(org.kie.workbench.common.screens.datasource.management.model.DataSourceDeploymentInfo)

Aggregations

DataSourceDeploymentInfo (org.kie.workbench.common.screens.datasource.management.model.DataSourceDeploymentInfo)21 Test (org.junit.Test)7 DriverDeploymentInfo (org.kie.workbench.common.screens.datasource.management.model.DriverDeploymentInfo)4 SQLException (java.sql.SQLException)3 DataSourceDef (org.kie.workbench.common.screens.datasource.management.model.DataSourceDef)3 Before (org.junit.Before)2 DataSource (org.kie.workbench.common.screens.datasource.management.backend.core.DataSource)2 WildflyDataSourceDef (org.kie.workbench.common.screens.datasource.management.backend.integration.wildfly.WildflyDataSourceDef)2 DataSourceDefInfo (org.kie.workbench.common.screens.datasource.management.model.DataSourceDefInfo)2 DriverDef (org.kie.workbench.common.screens.datasource.management.model.DriverDef)2 URI (java.net.URI)1 ArrayList (java.util.ArrayList)1 Properties (java.util.Properties)1 ConnectionFactory (org.apache.commons.dbcp2.ConnectionFactory)1 PoolableConnection (org.apache.commons.dbcp2.PoolableConnection)1 PoolableConnectionFactory (org.apache.commons.dbcp2.PoolableConnectionFactory)1 PoolingDataSource (org.apache.commons.dbcp2.PoolingDataSource)1 GenericObjectPool (org.apache.commons.pool2.impl.GenericObjectPool)1 DataColumn (org.dashbuilder.dataset.DataColumn)1 DataSet (org.dashbuilder.dataset.DataSet)1