Search in sources :

Example 1 with CleanupDatabaseJob

use of nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob in project iaf by ibissource.

the class CleanupDatabaseJobTest method setup.

@Override
@Before
public void setup() throws Exception {
    super.setup();
    System.setProperty("tableName", tableName);
    runMigrator(TEST_CHANGESET_PATH);
    configuration = new TestConfiguration();
    Adapter adapter = setupAdapter();
    configuration.registerAdapter(adapter);
    jobDef = new CleanupDatabaseJob() {

        @Override
        protected Set<String> getAllLockerDatasourceNames(IbisManager ibisManager) {
            return Collections.singleton(getDataSourceName());
        }
    };
    configuration.autowireByName(jobDef);
}
Also used : Set(java.util.Set) IbisManager(nl.nn.adapterframework.configuration.IbisManager) TestConfiguration(nl.nn.adapterframework.testutil.TestConfiguration) Adapter(nl.nn.adapterframework.core.Adapter) CleanupDatabaseJob(nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob) Before(org.junit.Before)

Aggregations

Set (java.util.Set)1 IbisManager (nl.nn.adapterframework.configuration.IbisManager)1 Adapter (nl.nn.adapterframework.core.Adapter)1 CleanupDatabaseJob (nl.nn.adapterframework.scheduler.job.CleanupDatabaseJob)1 TestConfiguration (nl.nn.adapterframework.testutil.TestConfiguration)1 Before (org.junit.Before)1