UpgradeCatalog222 extends AbstractUpgradeCatalog { @Override protected void executeDMLUpdates() throws AmbariException, SQLException { addNewConfigurationsFromXml(); updateAlerts(); updateStormConfigs(); updateAMSConfigs(); updateHiveConfig(); updateHostRoleCommands(); updateHDFSWidgetDefinition(); updateYARNWidgetDefinition(); updateHBASEWidgetDefinition(); updateHbaseEnvConfig(); updateCorruptedReplicaWidget(); updateZookeeperConfigs(); updateHBASEConfigs(); createNewSliderConfigVersion(); initializeStromAndKafkaWidgets(); } @Inject  UpgradeCatalog222(Injector injector); @Override String getTargetVersion(); @Override String getSourceVersion(); static final String PRECISION_TABLE_TTL_PROPERTY; static final String CLUSTER_SECOND_TABLE_TTL_PROPERTY; static final String CLUSTER_MINUTE_TABLE_TTL_PROPERTY; static final String AMS_WEBAPP_ADDRESS_PROPERTY; static final String HBASE_CLIENT_SCANNER_TIMEOUT_PERIOD_PROPERTY; static final String HBASE_RPC_TIMEOUT_PROPERTY; static final String PHOENIX_QUERY_TIMEOUT_PROPERTY; static final String PHOENIX_QUERY_KEEPALIVE_PROPERTY; static final String TIMELINE_METRICS_CLUSTER_AGGREGATOR_INTERPOLATION_ENABLED; static final String TIMELINE_METRICS_SINK_COLLECTION_PERIOD; static final String AMS_SERVICE_NAME; static final String AMS_COLLECTOR_COMPONENT_NAME; final static String HBASE_SITE_HBASE_COPROCESSOR_MASTER_CLASSES; final static String HBASE_SITE_HBASE_COPROCESSOR_REGION_CLASSES; final static String HBASE_SITE_HBASE_COPROCESSOR_REGIONSERVER_CLASSES; }
@Test public void testExecuteDMLUpdates() throws Exception { Method addNewConfigurationsFromXml = AbstractUpgradeCatalog.class.getDeclaredMethod("addNewConfigurationsFromXml"); Method updateAlerts = UpgradeCatalog222.class.getDeclaredMethod("updateAlerts"); Method updateStormConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateStormConfigs"); Method updateAMSConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateAMSConfigs"); Method updateHiveConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateHiveConfig"); Method updateHostRoleCommands = UpgradeCatalog222.class.getDeclaredMethod("updateHostRoleCommands"); Method updateHDFSWidget = UpgradeCatalog222.class.getDeclaredMethod("updateHDFSWidgetDefinition"); Method updateYARNWidget = UpgradeCatalog222.class.getDeclaredMethod("updateYARNWidgetDefinition"); Method updateHBASEWidget = UpgradeCatalog222.class.getDeclaredMethod("updateHBASEWidgetDefinition"); Method updateHbaseEnvConfig = UpgradeCatalog222.class.getDeclaredMethod("updateHbaseEnvConfig"); Method updateCorruptedReplicaWidget = UpgradeCatalog222.class.getDeclaredMethod("updateCorruptedReplicaWidget"); Method createNewSliderConfigVersion = UpgradeCatalog222.class.getDeclaredMethod("createNewSliderConfigVersion"); Method updateZookeeperConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateZookeeperConfigs"); Method updateHBASEConfigs = UpgradeCatalog222.class.getDeclaredMethod("updateHBASEConfigs"); Method initializeStromAnsKafkaWidgets = UpgradeCatalog222.class.getDeclaredMethod("initializeStromAndKafkaWidgets"); UpgradeCatalog222 upgradeCatalog222 = createMockBuilder(UpgradeCatalog222.class) .addMockedMethod(addNewConfigurationsFromXml) .addMockedMethod(updateAlerts) .addMockedMethod(updateStormConfigs) .addMockedMethod(updateAMSConfigs) .addMockedMethod(updateHiveConfigs) .addMockedMethod(updateHostRoleCommands) .addMockedMethod(updateHDFSWidget) .addMockedMethod(updateYARNWidget) .addMockedMethod(updateHBASEWidget) .addMockedMethod(updateHbaseEnvConfig) .addMockedMethod(updateCorruptedReplicaWidget) .addMockedMethod(createNewSliderConfigVersion) .addMockedMethod(updateZookeeperConfigs) .addMockedMethod(updateHBASEConfigs) .addMockedMethod(initializeStromAnsKafkaWidgets) .createMock(); upgradeCatalog222.addNewConfigurationsFromXml(); upgradeCatalog222.updateAlerts(); upgradeCatalog222.updateStormConfigs(); upgradeCatalog222.updateAMSConfigs(); upgradeCatalog222.updateHostRoleCommands(); upgradeCatalog222.updateHiveConfig(); upgradeCatalog222.updateHDFSWidgetDefinition(); upgradeCatalog222.updateHbaseEnvConfig(); upgradeCatalog222.updateYARNWidgetDefinition(); upgradeCatalog222.updateHBASEWidgetDefinition(); upgradeCatalog222.updateCorruptedReplicaWidget(); upgradeCatalog222.updateZookeeperConfigs(); upgradeCatalog222.updateHBASEConfigs(); upgradeCatalog222.createNewSliderConfigVersion(); upgradeCatalog222.initializeStromAndKafkaWidgets(); replay(upgradeCatalog222); upgradeCatalog222.executeDMLUpdates(); verify(upgradeCatalog222); }