@Test public void globalParamsFieldsAreNotNulled() { System.setProperty( Const.KETTLE_GLOBAL_LOG_VARIABLES_CLEAR_ON_EXPORT, "false" ); tableFieldsChangedCorrectlyAfterNullingGlobalParams( GLOBAL_PARAM, GLOBAL_PARAM ); }
public void tableFieldsChangedCorrectlyAfterNullingGlobalParams( String valueForAllFields, String expectedAfterNullingGlobalParams ) { PerformanceLogTable performanceLogTable = getPerformanceLogTableWithAllEqFields( valueForAllFields ); performanceLogTable.setAllGlobalParametersToNull(); commonTableFieldsValueChecker( performanceLogTable, expectedAfterNullingGlobalParams ); assertEquals( performanceLogTable.getLogInterval(), expectedAfterNullingGlobalParams ); JobLogTable jobLogTable = getJobLogTableWithAllEqFields( valueForAllFields ); jobLogTable.setAllGlobalParametersToNull(); commonTableFieldsValueChecker( jobLogTable, expectedAfterNullingGlobalParams ); assertEquals( jobLogTable.getLogInterval(), expectedAfterNullingGlobalParams ); assertEquals( jobLogTable.getLogSizeLimit(), expectedAfterNullingGlobalParams ); TransLogTable transLogTable = getTransLogTableWithAllEqFields( valueForAllFields ); transLogTable.setAllGlobalParametersToNull(); commonTableFieldsValueChecker( transLogTable, expectedAfterNullingGlobalParams ); assertEquals( transLogTable.getLogInterval(), expectedAfterNullingGlobalParams ); assertEquals( transLogTable.getLogSizeLimit(), expectedAfterNullingGlobalParams ); }
private PerformanceLogTable getPerformanceLogTableWithAllEqFields( String fieldsValue ) { PerformanceLogTable performanceLogTable = PerformanceLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface ); initCommonTableFields( performanceLogTable, fieldsValue ); performanceLogTable.setLogInterval( fieldsValue ); return performanceLogTable; }
private TransLogTable getTransLogTableWithAllEqFields( String fieldsValue ) { TransLogTable transLogTable = TransLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface, null ); initCommonTableFields( transLogTable, fieldsValue ); transLogTable.setLogInterval( fieldsValue ); transLogTable.setLogSizeLimit( fieldsValue ); return transLogTable; }
@Test public void globalParamsFieldsAreNulled() { tableFieldsChangedCorrectlyAfterNullingGlobalParams( GLOBAL_PARAM, null ); }
private JobLogTable getJobLogTableWithAllEqFields( String fieldsValue ) { JobLogTable jobLogTable = JobLogTable.getDefault( mockedVariableSpace, mockedHasDbInterface ); initCommonTableFields( jobLogTable, fieldsValue ); jobLogTable.setLogSizeLimit( fieldsValue ); jobLogTable.setLogInterval( fieldsValue ); return jobLogTable; }
@Test public void userParamsFieldsNotChanged() { tableFieldsChangedCorrectlyAfterNullingGlobalParams( USER_PARAM, USER_PARAM ); }
@Test public void hardcodedFieldsNotChanged() { tableFieldsChangedCorrectlyAfterNullingGlobalParams( HARDCODED_VALUE, HARDCODED_VALUE ); }