Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Save $650 on Qlik Connect, Dec 1 - 7, our lowest price of the year. Register with code CYBERWEEK: Register
cancel
Showing results for 
Search instead for 
Did you mean: 
Os1
Contributor
Contributor

Job Pipe line Test cant find components and configurations.

Greetings,

Please can some one help out with this issue? I m trying to unit test a job pipe line  programmatically to no avail,  It seems as if the runtime cannot load the  mock collector component. I m using  version  1.1.7 of the studio runtime and version 1.1.5 of the component-api.

Here is my configuration 

 @Test
    public void inputTest() throws Exception {

        final TestInputMapperConfiguration configuration = new TestInputMapperConfiguration();
        configuration.setEmail("testmail.test");
        configuration.setName("testname");
        configuration.setSalary("10000");
        Datastore1 datastore1 = new Datastore1();
        Dataset1 dataset1 = new Dataset1();
        dataset1.setDatastore(datastore1);
        configuration.setDataset(dataset1);
        String uriconfig = SimpleFactory.configurationByExample().forInstance(configuration).configured().toQueryString();
        Job.components().component("TestInput", "Tutorial://TestInput?" + uriconfig).component("collector", "test:/collector")
                .connections().from("TestInput").to("collector").build().run();
         final  List<Record>   records = baseComponentsHandler.getCollectedData(Record.class);
         assertEquals(3,records.size());
    }

and Here is the error i m getting.

java.lang.IllegalStateException: No processor found for0683p000009MACJ.pngSLParser.Step(family=test, component=null, version=-1, configuration={})

at org.talend.sdk.component.runtime.manager.chain.internal.JobImpl$JobExecutor.lambda$null$5(JobImpl.java:345)
at java.util.Optional.orElseThrow(Optional.java:290)
at org.talend.sdk.component.runtime.manager.chain.internal.JobImpl$JobExecutor.lambda$localRun$8(JobImpl.java:344)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
at java.util.HashMap$KeySpliterator.forEachRemaining(HashMap.java:1553)
at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)
at java.util.stream.ReferencePipeline$7$1.accept(ReferencePipeline.java:270)
at java.util.TreeMap$ValueSpliterator.forEachRemaining(TreeMap.java:2897)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at org.talend.sdk.component.runtime.manager.chain.internal.JobImpl$JobExecutor.localRun(JobImpl.java:367)
at org.talend.sdk.component.runtime.manager.chain.internal.JobImpl$JobExecutor.run(JobImpl.java:295)
at de.cimt.talend.components.source.TestInputMapperTest.inputTest(TestInputMapperTest.java:81)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.talend.sdk.component.junit.SimpleComponentRule$1.evaluate(SimpleComponentRule.java:44)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

 

 

Best Regards

Os

 

 

 

 

 

 

 

 

 

 

 

 

Labels (3)
1 Solution

Accepted Solutions
florentlb
Contributor III
Contributor III

Hello,

 

From what you pasted, it seems that you're missing a '/' in:

("collector", "test:/collector")

It should be: 

("collector", "test://collector")

Could that be what's causing your issue?

 

Florent

 

View solution in original post

2 Replies
Anonymous
Not applicable

Hi @Os ,

 

From the error it seems you didn't set up correctly the output component and only used "collector". As mentionned in the doc it should be test://collector to be a valid uri.

 

florentlb
Contributor III
Contributor III

Hello,

 

From what you pasted, it seems that you're missing a '/' in:

("collector", "test:/collector")

It should be: 

("collector", "test://collector")

Could that be what's causing your issue?

 

Florent