use of org.pentaho.di.core.logging.JobEntryLogTable in project pentaho-kettle by pentaho.
the class SpoonExportXmlTest method initTables.
private void initTables(JobMeta jobMeta) {
JobLogTable jobLogTable = JobLogTable.getDefault(mockedVariableSpace, mockedHasDbInterface);
initTableWithSampleParams(jobLogTable);
jobLogTable.setLogInterval(GLOBAL_PARAM);
jobLogTable.setLogSizeLimit(GLOBAL_PARAM);
jobMeta.setJobLogTable(jobLogTable);
JobEntryLogTable jobEntryLogTable = JobEntryLogTable.getDefault(mockedVariableSpace, mockedHasDbInterface);
initTableWithSampleParams(jobEntryLogTable);
jobMeta.setJobEntryLogTable(jobEntryLogTable);
ChannelLogTable channelLogTable = ChannelLogTable.getDefault(mockedVariableSpace, mockedHasDbInterface);
initTableWithSampleParams(channelLogTable);
jobMeta.setChannelLogTable(channelLogTable);
jobMeta.setExtraLogTables(null);
}
use of org.pentaho.di.core.logging.JobEntryLogTable in project pentaho-kettle by pentaho.
the class Spoon method saveJobAsXmlFile.
private boolean saveJobAsXmlFile(JobMeta jobMeta, boolean export) {
JobLogTable origJobLogTable = jobMeta.getJobLogTable();
JobEntryLogTable originEntryLogTable = jobMeta.getJobEntryLogTable();
ChannelLogTable originChannelLogTable = jobMeta.getChannelLogTable();
List<LogTableInterface> originExtraLogTables = jobMeta.getExtraLogTables();
try {
XmlExportHelper.swapTables(jobMeta);
return saveXMLFile(jobMeta, export);
} finally {
jobMeta.setJobLogTable(origJobLogTable);
jobMeta.setJobEntryLogTable(originEntryLogTable);
jobMeta.setChannelLogTable(originChannelLogTable);
jobMeta.setExtraLogTables(originExtraLogTables);
}
}
use of org.pentaho.di.core.logging.JobEntryLogTable in project pentaho-kettle by pentaho.
the class JobTest method recordsCleanUpMethodIsCalled_JobEntryLogTable.
@Test
public void recordsCleanUpMethodIsCalled_JobEntryLogTable() throws Exception {
JobEntryLogTable jobEntryLogTable = JobEntryLogTable.getDefault(mockedVariableSpace, hasDatabasesInterface);
setAllTableParamsDefault(jobEntryLogTable);
JobMeta jobMeta = new JobMeta();
jobMeta.setJobEntryLogTable(jobEntryLogTable);
when(mockedJob.getJobMeta()).thenReturn(jobMeta);
doCallRealMethod().when(mockedJob).writeJobEntryLogInformation();
mockedJob.writeJobEntryLogInformation();
verify(mockedDataBase).cleanupLogRecords(jobEntryLogTable);
}
Aggregations