isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Huber <ahu...@apache.org>
Subject Re: Integration tests
Date Wed, 05 Sep 2018 05:03:32 GMT
We do track these as separate issues [1], [2] and [3] now.

I'm very pleased as well to see people actually try out the new major version. Also I'd like
to mention the Wiki page 'Roadmap to Version 2' [4] which tries to summarize the topics, we
are visioning for the 2.0.0 release. Also note, these topics are open for discussion and feedback
is always welcome!

Cheers, Andi!

[1] https://issues.apache.org/jira/browse/ISIS-1978
[2] https://issues.apache.org/jira/browse/ISIS-1979
[3] https://issues.apache.org/jira/browse/ISIS-1980
[4] https://cwiki.apache.org/confluence/display/ISIS/Roadmap+to+Version+2

On 2018/09/03 12:41:02, Gabriel Terwesten <gabriel@terwesten.net> wrote: 
> Hey Dan,
> 
> Thanks for the fast response. I just check to see if the wrapper issue exists with version
1.16.2 and I see the same behaviour there.
> 
> > Am 02.09.2018 um 18:42 schrieb Dan Haywood <dan@haywood-associates.co.uk>:
> > 
> > Hi Gabriel,
> > 
> > Thanks for reporting this, nice to know that our first milestone towards
> > 2.0.0 is being played with.
> > 
> > The issues you've reported make sense, I'll take a look into them this week.
> > 
> > If you get the time, perhaps you could tell me whether the wrapping issue
> > is also a problem for 1.16.2? The code you've written ought to work, but
> > then again I'm not sure if the integ tests we have in our own main app do
> > this, so maybe it's broken in 1.16.x also?
> > 
> > Meantime, feel free to raise a ticket in Jira for each of the issues.
> > 
> > Thanks,
> > Dan.
> > 
> > On Sun, 2 Sep 2018, 17:03 Gabriel Terwesten, <gabriel@terwesten.net> wrote:
> > 
> >> I just started experimenting with Apache Isis and had some issues running
> >> integration tests.
> >> 
> >> 1. Integration tests are not executed in module `module-simple`.
> >> 
> >> This is only true for projects generated from the 2.0.0-M1 archetype. The
> >> integration tests in module `application` are executed.
> >> 
> >> To reproduce generate a project:
> >> 
> >> mvn archetype:generate  \
> >>    -D archetypeGroupId=org.apache.isis.archetype \
> >>    -D archetypeArtifactId=simpleapp-archetype \
> >>    -D archetypeVersion=2.0.0-M1 \
> >>    -D groupId=com.mycompany \
> >>    -D artifactId=isis-2 \
> >>    -D version=1.0-SNAPSHOT \
> >>    -B
> >> 
> >> Then execute:
> >> 
> >> - mvn clean install
> >> - mvn -pl module-simple verify
> >> 
> >> The test output for integration tests is empty.
> >> 
> >> 2. Integration test logging includes a lot of log events twice.
> >> 
> >> During the bootstrapping of Isis for the integration test there seem to be
> >> two appenders. The lines starting with the current time come from the
> >> appender configured in `logging-integtest.properties`. I was not able to
> >> understand where the second appender is configured. This is not a big
> >> problem just a bit distracting.
> >> 
> >> Here is an example:
> >> 
> >> [INFO]
> >> [INFO] --- maven-surefire-plugin:2.19.1:test (integ-bddspecs) @
> >> isis-2-application ---
> >> 
> >> -------------------------------------------------------
> >> T E S T S
> >> -------------------------------------------------------
> >> Running domainapp.application.bdd.specs.RunIntegBddSpecs
> >> 17:23:27,766  [HeadlessWithBootstrappingAbstract main       INFO ]
> >> isis.integTest.module = null
> >> 17:23:27,767  [HeadlessWithBootstrappingAbstract main       INFO ]
> >> isis.headless.module = null
> >> 17:23:27,840  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.appManifest = org.apache.isis.applib.AppManifestAbstract2$Default
> >> 74    [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.appManifest = org.apache.isis.applib.AppManifestAbstract2$Default
> >> 17:23:28,077  [Reflections          main       INFO ]  Reflections took
> >> 195 ms to scan 12 urls, producing 319 keys and 1050 values
> >> 311   [Reflections               main       INFO ]  Reflections took 195
> >> ms to scan 12 urls, producing 319 keys and 1050 values
> >> 17:23:28,204  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.services.ServicesInstallerFromAnnotation.packagePrefix =
> >> domainapp.modules.simple,domainapp.application
> >> 438   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.services.ServicesInstallerFromAnnotation.packagePrefix =
> >> domainapp.modules.simple,domainapp.application
> >> 17:23:28,205  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.RegisterEntities.packagePrefix =
> >> domainapp.modules.simple,domainapp.application
> >> 439   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.RegisterEntities.packagePrefix =
> >> domainapp.modules.simple,domainapp.application
> >> 17:23:28,207  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.services =
> >> org.apache.isis.core.integtestsupport.components.HeadlessTransactionSupportDefault
> >> 441   [IsisConfigurationDefault  main       INFO ]  adding isis.services =
> >> org.apache.isis.core.integtestsupport.components.HeadlessTransactionSupportDefault
> >> 17:23:28,207  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.deploymentType = server_prototype
> >> 441   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.deploymentType = server_prototype
> >> 17:23:28,207  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.cache.level2.type = none
> >> 441   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.cache.level2.type = none
> >> 17:23:28,207  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit
> >> = false
> >> 441   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.persistenceByReachabilityAtCommit
> >> = false
> >> 17:23:28,208  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode =
> >> ENABLE_SELECTIVE
> >> 442   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.cache.level2.mode =
> >> ENABLE_SELECTIVE
> >> 17:23:28,208  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName =
> >> org.hsqldb.jdbcDriver
> >> 442   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionDriverName =
> >> org.hsqldb.jdbcDriver
> >> 17:23:28,208  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.schema.validateAll = false
> >> 442   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.datanucleus.schema.validateAll = false
> >> 17:23:28,208  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword =
> >> ********
> >> 442   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionPassword =
> >> ********
> >> 17:23:28,209  [IsisConfigurationDefault main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL =
> >> jdbc:hsqldb:mem:test-07b19913-71b6-4994-8d71-6a3aaaf79e00
> >> 443   [IsisConfigurationDefault  main       INFO ]  adding
> >> isis.persistor.datanucleus.impl.javax.jdo.option.ConnectionURL =
> >> jdbc:hsqldb:mem:test-07b19913-71b6-4994-8d71-6a3aaaf79e00
> >> 
> >> 3. Unexpected error when accessing collection through wrapper.
> >> 
> >> Inside of integration tests i can’t seem to access collections through the
> >> getter if the object is wrapped. From the documentation I got the
> >> impression that that should be possible.
> >> 
> >> This is the offending line:
> >> 
> >> assertThat(wrap(food).getCustomUnits()).hasSize(1);
> >> 
> >> This is the error I see:
> >> 
> >> java.lang.IllegalArgumentException:
> >> domainapp.modules.core.dom.impl.Food#customUnits: more than one
> >> ImperativeFacet for method getCustomUnits , with inconsistent intents:
> >> [CollectionAccessorFacetViaAccessor[type=PropertyOrCollectionAccessorFacet,method=public
> >> java.util.SortedSet domainapp.modules.core.dom.impl.Food.getCustomUnits()],
> >> CollectionClearFacetViaAccessor[type=CollectionClearFacet,method=public
> >> java.util.SortedSet domainapp.modules.core.dom.impl.Food.getCustomUnits()],
> >> CollectionAddToFacetViaAccessor[type=CollectionAddToFacet,method=public
> >> java.util.SortedSet domainapp.modules.core.dom.impl.Food.getCustomUnits()],
> >> CollectionRemoveFromFacetViaAccessor[type=CollectionRemoveFromFacet,method=public
> >> java.util.SortedSet domainapp.modules.core.dom.impl.Food.getCustomUnits()]]
> >> 
> >>        at
> >> org.apache.isis.core.metamodel.facets.ImperativeFacet$Util.getIntent(ImperativeFacet.java:167)
> >>        at
> >> org.apache.isis.core.wrapper.handlers.DomainObjectInvocationHandler.invoke(DomainObjectInvocationHandler.java:199)
> >>        at
> >> domainapp.modules.core.dom.impl.Food$bb$VbQPvDRl.getCustomUnits(Unknown
> >> Source)
> >>        at
> >> domainapp.modules.core.integtests.tests.Food_IntegTest$AddUnit.shouldWork(Food_IntegTest.java:32)
> >>        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.platform.commons.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:513)
> >>        at
> >> org.junit.jupiter.engine.execution.ExecutableInvoker.invoke(ExecutableInvoker.java:115)
> >>        at
> >> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeTestMethod$6(TestMethodTestDescriptor.java:170)
> >>        at
> >> org.junit.jupiter.engine.execution.ThrowableCollector.execute(ThrowableCollector.java:40)
> >>        at
> >> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod(TestMethodTestDescriptor.java:166)
> >>        at
> >> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:113)
> >>        at
> >> org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:58)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:113)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> >>        at
> >> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
> >>        at java.util.Iterator.forEachRemaining(Iterator.java:116)
> >>        at
> >> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
> >>        at
> >> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> >>        at
> >> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
> >>        at
> >> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> >>        at
> >> java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:121)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$2(HierarchicalTestExecutor.java:121)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
> >>        at
> >> java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175)
> >>        at java.util.Iterator.forEachRemaining(Iterator.java:116)
> >>        at
> >> java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
> >>        at
> >> java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
> >>        at
> >> java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
> >>        at
> >> java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
> >>        at
> >> java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
> >>        at
> >> java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.lambda$executeRecursively$3(HierarchicalTestExecutor.java:121)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.SingleTestExecutor.executeSafely(SingleTestExecutor.java:66)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.executeRecursively(HierarchicalTestExecutor.java:108)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor$NodeExecutor.execute(HierarchicalTestExecutor.java:79)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:55)
> >>        at
> >> org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:43)
> >>        at
> >> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:170)
> >>        at
> >> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:154)
> >>        at
> >> org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:90)
> >>        at
> >> com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:74)
> >>        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)
> >> 
> >> I can provide a demo repo if this needs some investigation but maybe I’m
> >> making some obvious mistake here.
> >> 
> >> Thanks four your help.
> >> 
> >> --
> > DISCLAIMER: This e-mail is from Haywood Associates Ltd (Registered Number
> > 3525455) and it and its attachments may be confidential and are intended
> > solely for the use of the individual to whom it is addressed.  Any
> > unauthorised use or dissemination of this communication is strictly
> > prohibited. Any information provided to Haywood Associates Ltd shall be
> > retained and used in accordance with our Privacy Statement at
> > http://www.haywood-associates.co.uk/privacy.  If you have received this
> > communication in error, please immediately notify the sender by return
> > e-mail message and delete all copies of the original communication.
> 
> 

Mime
View raw message