Search in sources :

Example 11 with IExecutionData

use of org.pentaho.metaverse.api.model.IExecutionData in project pentaho-metaverse by pentaho.

the class StepExternalResourceConsumerListenerTest method testCallStepAddExternalResources.

@Test
public void testCallStepAddExternalResources() {
    StepExternalResourceConsumerListener stepExtensionPoint = new StepExternalResourceConsumerListener();
    stepExtensionPoint.addExternalResources(null, null);
    StepInterface mockStep = mock(StepInterface.class);
    Trans mockTrans = mock(Trans.class);
    when(mockStep.getTrans()).thenReturn(mockTrans);
    IExecutionProfile executionProfile = mock(IExecutionProfile.class);
    IExecutionData executionData = mock(IExecutionData.class);
    when(executionProfile.getExecutionData()).thenReturn(executionData);
    LineageHolder holder = new LineageHolder();
    holder.setExecutionProfile(executionProfile);
    TransLineageHolderMap.getInstance().putLineageHolder(mockTrans, holder);
    Collection<IExternalResourceInfo> externalResources = new ArrayList<IExternalResourceInfo>();
    stepExtensionPoint.addExternalResources(externalResources, mockStep);
    IExternalResourceInfo externalResource = mock(IExternalResourceInfo.class);
    externalResources.add(externalResource);
    stepExtensionPoint.addExternalResources(externalResources, mockStep);
}
Also used : StepInterface(org.pentaho.di.trans.step.StepInterface) IExecutionData(org.pentaho.metaverse.api.model.IExecutionData) IExternalResourceInfo(org.pentaho.metaverse.api.model.IExternalResourceInfo) IExecutionProfile(org.pentaho.metaverse.api.model.IExecutionProfile) ArrayList(java.util.ArrayList) Trans(org.pentaho.di.trans.Trans) LineageHolder(org.pentaho.metaverse.api.model.LineageHolder) Test(org.junit.Test)

Example 12 with IExecutionData

use of org.pentaho.metaverse.api.model.IExecutionData in project pentaho-metaverse by pentaho.

the class FileSystemLineageWriterTest method setUp.

@Before
public void setUp() throws Exception {
    FileSystemLineageWriter fslw = new FileSystemLineageWriter();
    writer = spy(fslw);
    holder = new LineageHolder();
    IExecutionProfile profile = new ExecutionProfile();
    profile.setName("test");
    IExecutionData data = new ExecutionData();
    data.setStartTime(now);
    profile.setExecutionData(data);
    holder.setExecutionProfile(profile);
    writer.setOutputFolder("target/outputfiles");
}
Also used : IExecutionData(org.pentaho.metaverse.api.model.IExecutionData) IExecutionProfile(org.pentaho.metaverse.api.model.IExecutionProfile) IExecutionProfile(org.pentaho.metaverse.api.model.IExecutionProfile) ExecutionProfile(org.pentaho.metaverse.impl.model.ExecutionProfile) LineageHolder(org.pentaho.metaverse.api.model.LineageHolder) IExecutionData(org.pentaho.metaverse.api.model.IExecutionData) ExecutionData(org.pentaho.metaverse.impl.model.ExecutionData) Before(org.junit.Before)

Aggregations

IExecutionData (org.pentaho.metaverse.api.model.IExecutionData)12 IExecutionProfile (org.pentaho.metaverse.api.model.IExecutionProfile)9 Test (org.junit.Test)5 LineageHolder (org.pentaho.metaverse.api.model.LineageHolder)5 Before (org.junit.Before)3 JobMeta (org.pentaho.di.job.JobMeta)3 ExecutionData (org.pentaho.metaverse.impl.model.ExecutionData)3 ExecutionProfile (org.pentaho.metaverse.impl.model.ExecutionProfile)3 IOException (java.io.IOException)2 Timestamp (java.sql.Timestamp)2 ArrayList (java.util.ArrayList)2 Date (java.util.Date)2 ExecutionException (java.util.concurrent.ExecutionException)2 KettleClientEnvironment (org.pentaho.di.core.KettleClientEnvironment)2 ResultFile (org.pentaho.di.core.ResultFile)2 KettleException (org.pentaho.di.core.exception.KettleException)2 UnknownParamException (org.pentaho.di.core.parameters.UnknownParamException)2 Job (org.pentaho.di.job.Job)2 JobEntryInterface (org.pentaho.di.job.entry.JobEntryInterface)2 ResourceEntry (org.pentaho.di.resource.ResourceEntry)2