Search in sources :

Example 6 with Checkpoint

use of nl.nn.testtool.Checkpoint in project iaf by ibissource.

the class Debugger method stubINamedObject.

private boolean stubINamedObject(String checkpointNamePrefix, INamedObject namedObject, String correlationId) {
    boolean stub = false;
    boolean rerun;
    synchronized (inRerun) {
        rerun = inRerun.contains(correlationId);
    }
    if (rerun) {
        Checkpoint originalEndpoint = testTool.getOriginalEndpointOrAbortpointForCurrentLevel(correlationId);
        if (originalEndpoint == null) {
            // stub = stub(getCheckpointNameForINamedObject(checkpointNamePrefix, namedObject), true, getDefaultStubStrategy());
            // TODO zou ook gewoon het orginele report kunnen gebruiken (via opslaan in iets als inRerun) of inRerun ook via testTool doen?
            Report reportInProgress = testTool.getReportInProgress(correlationId);
            stub = stub(getCheckpointNameForINamedObject(checkpointNamePrefix, namedObject), true, (reportInProgress == null ? null : reportInProgress.getStubStrategy()));
        } else {
            if (originalEndpoint.getStub() == Checkpoint.STUB_FOLLOW_REPORT_STRATEGY) {
                stub = stub(originalEndpoint, originalEndpoint.getReport().getStubStrategy());
            } else if (originalEndpoint.getStub() == Checkpoint.STUB_NO) {
                stub = false;
            } else if (originalEndpoint.getStub() == Checkpoint.STUB_YES) {
                stub = true;
            }
        }
    } else {
        stub = false;
    }
    return stub;
}
Also used : Checkpoint(nl.nn.testtool.Checkpoint) Report(nl.nn.testtool.Report)

Aggregations

Checkpoint (nl.nn.testtool.Checkpoint)6 IAdapter (nl.nn.adapterframework.core.IAdapter)3 PipeLineSession (nl.nn.adapterframework.core.PipeLineSession)3 Message (nl.nn.adapterframework.stream.Message)3 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 List (java.util.List)2 PipeLineResult (nl.nn.adapterframework.core.PipeLineResult)2 Report (nl.nn.testtool.Report)2 StorageException (nl.nn.testtool.storage.StorageException)2 ResultSet (java.sql.ResultSet)1 SQLException (java.sql.SQLException)1 DataAccessException (org.springframework.dao.DataAccessException)1 RowMapper (org.springframework.jdbc.core.RowMapper)1