Package org.rhq.server.metrics.migrator.workers

Examples of org.rhq.server.metrics.migrator.workers.RawDataMigrator


    }

    public long estimate() throws Exception {
        this.estimation = 0;
        if (config.isRunRawDataMigration()) {
            retryOnFailure(new RawDataMigrator(config), Task.Estimate);
        }

        if (config.isRun1HAggregateDataMigration()) {
            retryOnFailure(new AggregateDataMigrator(MigrationTable.ONE_HOUR, config), Task.Estimate);
        }
View Full Code Here


        return estimation;
    }

    public void migrateData() throws Exception {
        if (config.isRunRawDataMigration()) {
            retryOnFailure(new RawDataMigrator(config), Task.Migrate);
        }

        if (config.isRun1HAggregateDataMigration()) {
            retryOnFailure(new AggregateDataMigrator(MigrationTable.ONE_HOUR, config), Task.Migrate);
        }
View Full Code Here

        when(mockConfig.isRunRawDataMigration()).thenReturn(true);
        when(mockConfig.isRun1HAggregateDataMigration()).thenReturn(false);
        when(mockConfig.isRun6HAggregateDataMigration()).thenReturn(false);
        when(mockConfig.isRun1DAggregateDataMigration()).thenReturn(false);

        RawDataMigrator mockRawDataMigrator = mock(RawDataMigrator.class);
        PowerMockito.whenNew(RawDataMigrator.class).withArguments(eq(mockConfig)).thenReturn(mockRawDataMigrator);
        long estimateExpected = 1234L;
        when(mockRawDataMigrator.estimate()).thenReturn(estimateExpected);

        //create object to test and inject required dependencies
        DataMigrator objectUnderTest = new DataMigrator(mockEntityManager, mockCassandraSession, databaseType);

        //run code under test
View Full Code Here

TOP

Related Classes of org.rhq.server.metrics.migrator.workers.RawDataMigrator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.