[JBoss JIRA] (ARQ-1347) Not possible to run a spock test w/o arquillian
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1347?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak commented on ARQ-1347:
-------------------------------------
Good hint, thanks a lot for the feedback. I think we can leverage AbstractAnnotationDrivenExtension stuff for that.
> Not possible to run a spock test w/o arquillian
> -----------------------------------------------
>
> Key: ARQ-1347
> URL: https://issues.jboss.org/browse/ARQ-1347
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Alpha2
> Reporter: Fabian Schwarzer
> Assignee: Bartosz Majsak
> Fix For: spock_1.0.0.next
>
>
> If I use spock to implement my unit tests and my arquillian tests, it is not possible to run spock (unit) tests w/o Arquillian any more. Afaik this is possible if JUnit is used. Annotate them with @Arquillian -> running as Arquillian test; Don't annotate them -> running as "normal" unit tests.
> I would like to have this behaviour with spock as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1347) Not possible to run a spock test w/o arquillian
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1347?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1347:
--------------------------------
Fix Version/s: spock_1.0.0.next
> Not possible to run a spock test w/o arquillian
> -----------------------------------------------
>
> Key: ARQ-1347
> URL: https://issues.jboss.org/browse/ARQ-1347
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Alpha2
> Reporter: Fabian Schwarzer
> Assignee: Bartosz Majsak
> Fix For: spock_1.0.0.next
>
>
> If I use spock to implement my unit tests and my arquillian tests, it is not possible to run spock (unit) tests w/o Arquillian any more. Afaik this is possible if JUnit is used. Annotate them with @Arquillian -> running as Arquillian test; Don't annotate them -> running as "normal" unit tests.
> I would like to have this behaviour with spock as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1347) Not possible to run a spock test w/o arquillian
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1347?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1347:
--------------------------------
Affects Version/s: spock_1.0.0.Alpha2
> Not possible to run a spock test w/o arquillian
> -----------------------------------------------
>
> Key: ARQ-1347
> URL: https://issues.jboss.org/browse/ARQ-1347
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Alpha2
> Reporter: Fabian Schwarzer
> Assignee: Bartosz Majsak
>
> If I use spock to implement my unit tests and my arquillian tests, it is not possible to run spock (unit) tests w/o Arquillian any more. Afaik this is possible if JUnit is used. Annotate them with @Arquillian -> running as Arquillian test; Don't annotate them -> running as "normal" unit tests.
> I would like to have this behaviour with spock as well.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1150) @Transactional javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1150?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak closed ARQ-1150.
-------------------------------
> @Transactional javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
> -----------------------------------------------------------------------------------------------------------------
>
> Key: ARQ-1150
> URL: https://issues.jboss.org/browse/ARQ-1150
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha5
> Environment: Linux Ubuntu 12.04.1 LTS jdk64/jdk1.6.0_29 JBossAS 6.1.0.Final managed Ant Ivy JUnit
> Reporter: Matti Linnanvuori
> Assignee: Bartosz Majsak
>
> Using @Transactional does not avoid getting an error at em.persist.
> [junit] EntityManager must be access within a transaction
> [junit] javax.persistence.TransactionRequiredException: EntityManager must be access within a transaction
> [junit] at org.jboss.jpa.deployment.ManagedEntityManagerFactory.verifyInTx(ManagedEntityManagerFactory.java:157)
> [junit] at org.jboss.jpa.deployment.PersistenceUnitDeployment.verifyInTx(PersistenceUnitDeployment.java:318)
> [junit] at org.jboss.jpa.impl.tx.TransactionScopedEntityManager.verifyInTx(TransactionScopedEntityManager.java:105)
> [junit] at org.jboss.jpa.impl.tx.TransactionScopedEntityManager.persist(TransactionScopedEntityManager.java:205)
> [junit] at com.ecolane.test.unit.TripRestTest.testLockRunsForTrips(TripRestTest.java:132)
> [junit] at org.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
> [junit] at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
> [junit] at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> [junit] at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> [junit] at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
> [junit] at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
> [junit] at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
> [junit] at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
> [junit] at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
> [junit] at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> [junit] at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
> [junit] at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> [junit] at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
> [junit] at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:94)
> [junit] at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
> [junit] at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
> [junit] at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
> [junit] at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
> [junit] at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)
> [junit] at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
> [junit] at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
> [junit] at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)
> [junit] at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
> [junit] at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
> [junit] at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
> [junit] at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
> [junit] at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
> [junit] at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
> [junit] at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:160)
> [junit] at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:126)
> [junit] at org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:90)
> [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
> [junit] at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> [junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324)
> [junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
> [junit] at org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
> [junit] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:274)
> [junit] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242)
> [junit] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275)
> [junit] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
> [junit] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181)
> [junit] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285)
> [junit] at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261)
> [junit] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88)
> [junit] at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100)
> [junit] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:159)
> [junit] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
> [junit] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
> [junit] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> [junit] at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53)
> [junit] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362)
> [junit] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877)
> [junit] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654)
> [junit] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951)
> [junit] at java.lang.Thread.run(Thread.java:662)
> @Test
> @Transactional
> public void testLockRunsForTrips() throws java.text.ParseException,
> java.io.IOException, org.xml.sax.SAXException {
> final Trip trip = new Trip(0);
> final MetaRoute metaRoute = new MetaRoute(0);
> trip.setMetaRoute(metaRoute);
> final Run run = new RealRun(new RunPK(0));
> metaRoute.setRun(run);
> final Route route = new Route(0);
> route.setMetaRoute(metaRoute);
> final Stop stop = new Stop();
> stop.setStopType(DatabaseConstants.STOP_TYPE_AVAILABILITY_START);
> stop.setRoute(route);
> final String DATE = "2012-09-27";
> final Calendar time = DatatypeConverter.parseDate(DATE);
> final Calendar startTime = (Calendar) time.clone();
> startTime.add(Calendar.HOUR, 8);
> metaRoute.setStartTime(startTime.getTime());
> startTime.add(Calendar.MINUTE, 15);
> trip.setPromisedPickup(startTime.getTime());
> em.persist(trip);
> <dependency org="org.jboss.arquillian.container" name="arquillian-jbossas-managed-6" rev="1.0.0.Final-SNAPSHOT" />
> <dependency org="org.jboss.arquillian.extension" name="arquillian-persistence-impl" rev="1.0.0.Alpha5"/>
> <dependency org="org.jboss.arquillian.extension" name="arquillian-transaction-api" rev="1.0.0.Final-SNAPSHOT"/>
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1299) Persistence extension throws NPE with empty table DataSets
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1299?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak updated ARQ-1299:
--------------------------------
Fix Version/s: persistence_1.0.0.Alpha6
> Persistence extension throws NPE with empty table DataSets
> ----------------------------------------------------------
>
> Key: ARQ-1299
> URL: https://issues.jboss.org/browse/ARQ-1299
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha5
> Environment: JDK 1.7.0_03 x64 / Windows 7 x64 / Arquillian 1.0.1 / DBUnit 2.4.9 / Snakeyaml 1.11 / Glassfish 3.1.2 / Arquillian GF remote container 1.0.0CR3
> Reporter: Noah White
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.Alpha6
>
>
> I have a Arq Persistence Ext test method which loads YAML formatted data using @DataSet.
> In the data file I have a mix of tables with data and 'empty' tables. The empty tables are specified to facilitate their cleaning as they contain data created during the test and affect referential FK constraints.
> DBUnit provides for specifying an empty table w/YAML like so where you simply specify the table name and a colon like so:
> MY_EMPTY_TABLE_1:
> MY_EMPTY_TABLE_2:
> When I do that I get the following NPE as it appears Arq persistence dbunit does not do a NULL check when it extracts the columns:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.extractColumns(YamlDataSetProducer.java:139)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createTables(YamlDataSetProducer.java:119)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(YamlDataSetProducer.java:74)
> at org.dbunit.dataset.CachedDataSet.<init>(CachedDataSet.java:97)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:60)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:85)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:80)
> at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.loadYamlDataSet(DataSetBuilder.java:92)
> at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.build(DataSetBuilder.java:65)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1299) Persistence extension throws NPE with empty table DataSets
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1299?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak closed ARQ-1299.
-------------------------------
> Persistence extension throws NPE with empty table DataSets
> ----------------------------------------------------------
>
> Key: ARQ-1299
> URL: https://issues.jboss.org/browse/ARQ-1299
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha5
> Environment: JDK 1.7.0_03 x64 / Windows 7 x64 / Arquillian 1.0.1 / DBUnit 2.4.9 / Snakeyaml 1.11 / Glassfish 3.1.2 / Arquillian GF remote container 1.0.0CR3
> Reporter: Noah White
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.Alpha6
>
>
> I have a Arq Persistence Ext test method which loads YAML formatted data using @DataSet.
> In the data file I have a mix of tables with data and 'empty' tables. The empty tables are specified to facilitate their cleaning as they contain data created during the test and affect referential FK constraints.
> DBUnit provides for specifying an empty table w/YAML like so where you simply specify the table name and a colon like so:
> MY_EMPTY_TABLE_1:
> MY_EMPTY_TABLE_2:
> When I do that I get the following NPE as it appears Arq persistence dbunit does not do a NULL check when it extracts the columns:
> {code:java}
> Caused by: java.lang.NullPointerException
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.extractColumns(YamlDataSetProducer.java:139)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.createTables(YamlDataSetProducer.java:119)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSetProducer.produce(YamlDataSetProducer.java:74)
> at org.dbunit.dataset.CachedDataSet.<init>(CachedDataSet.java:97)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:60)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:85)
> at org.jboss.arquillian.persistence.dbunit.dataset.yaml.YamlDataSet.<init>(YamlDataSet.java:80)
> at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.loadYamlDataSet(DataSetBuilder.java:92)
> at org.jboss.arquillian.persistence.dbunit.dataset.DataSetBuilder.build(DataSetBuilder.java:65)
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years
[JBoss JIRA] (ARQ-1302) Support Weld 2.x
by Aslak Knutsen (JIRA)
[ https://issues.jboss.org/browse/ARQ-1302?page=com.atlassian.jira.plugin.s... ]
Aslak Knutsen closed ARQ-1302.
------------------------------
> Support Weld 2.x
> ----------------
>
> Key: ARQ-1302
> URL: https://issues.jboss.org/browse/ARQ-1302
> Project: Arquillian
> Issue Type: Feature Request
> Security Level: Public(Everyone can see)
> Components: Weld Containers
> Affects Versions: weld_1.0.0.CR5
> Reporter: Aslak Knutsen
> Assignee: Aslak Knutsen
> Fix For: weld_1.0.0.CR6
>
>
> ARQ-1168 Added a tight dependency on the BeansXml API from Weld Bootstrap SPI. This SPI has changed in the Weld 2.x branch which cause the Container to fail runtime.
> The reason for the tight dependency is to support merging duplicate entries in beans.xml when using a FlatDeployment structure.
> Weld 2.x Bootstrap has added support for this feature via the new parse(beans.xml, merge) method.
> Update the weld containers to support the old and new way of merging the beans.xml.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years