Hello everyone,
First of all, thank you very much for this awesome software. I am working on my diploma thesis and I am integrating rapidminer into my application to validate my findings. So far I have been able to integrate the application just fine and I have to say the GUI works very well for designing the processes.
Here is my problem however. The project I am working on requires the software to be built with Maven. I have written test cases for each of my process wrappers for jUnit and they work great when I run them separately. However when I run the tests in chain during the maven build process I get a ton of AssertionErrors that, as far as I can tell, originate from the fact that jUnit creates a new instance of my wrapper in each test and as such tries to initialise rapidminer more than once.
I can not work around the limitation that jUnit tries to create new instances with each test. My question thus is: Is there a way to find out if rapidminer has already been initialized? I do keep track of it in my application but since each tests starts a new instance I would require a way to ask the RapidMiner process if it has already been initialized.
Below is the stack trace I get when the tests are run automatically.
Thanks in advance for your help,
Daniel
java.lang.AssertionError
at com.rapidminer.io.process.rules.ChangeParameterValueRule.<init>(ChangeParameterValueRule.java:47)
at com.rapidminer.io.process.XMLImporter.constructRuleFromElement(XMLImporter.java:198)
at com.rapidminer.io.process.XMLImporter.importParseRules(XMLImporter.java:169)
at com.rapidminer.io.process.XMLImporter.init(XMLImporter.java:125)
at com.rapidminer.RapidMiner.init(RapidMiner.java:513)
at my.application.processing.wrappers.rapidminer.AbstractRapidMinerWrapper.init(AbstractRapidMinerWrapper.java:213)
at my.application.processing.wrappers.rapidminer.AbstractRapidMinerWrapper.runProcess(AbstractRapidMinerWrapper.java:253)
at my.application.processing.wrappers.rapidminer.AbstractRapidMinerClusteringWrapper.apply(AbstractRapidMinerClusteringWrapper.java:88)
at my.application.processing.wrappers.rapidminer.AbstractRapidMinerClusteringWrapper.apply(AbstractRapidMinerClusteringWrapper.java:68)
at my.application.processing.wrappers.rapidminer.RMHACCompleteWrapper.process(RMHACCompleteWrapper.java:56)
at my.application.processing.wrappers.rapidminer.RMHACCompleteWrapperTest.testClustering(RMHACCompleteWrapperTest.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)