[JBoss JIRA] (ARQ-1782) @UsingDataSet/@ShouldMatchDataSet always makes test succeed
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1782?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak closed ARQ-1782.
-------------------------------
Resolution: Out of Date
Fixed in 1.1.5.Final - https://issues.jboss.org/browse/ARQ-1758
> @UsingDataSet/@ShouldMatchDataSet always makes test succeed
> -----------------------------------------------------------
>
> Key: ARQ-1782
> URL: https://issues.jboss.org/browse/ARQ-1782
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha7
> Environment: WildFly 8 CR 2
> Reporter: Nicklas Karlsson
> Assignee: Bartosz Majsak
> Fix For: persistence_1.0.0.next
>
>
> {code:xml}
> <?xml version="1.0" encoding="UTF-8"?>
> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://maven.apache.org/POM/4.0.0
> http://maven.apache.org/xsd/maven-4.0.0.xsd">
> <modelVersion>4.0.0</modelVersion>
> <groupId>fi.affecto.marela</groupId>
> <artifactId>arq-concept</artifactId>
> <version>1.0.0-SNAPSHOT</version>
> <packaging>jar</packaging>
> <properties>
> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
> <browser>chrome</browser>
> </properties>
> <dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>org.jboss.arquillian</groupId>
> <artifactId>arquillian-bom</artifactId>
> <version>1.1.4.Final</version>
> <scope>import</scope>
> <type>pom</type>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-drone-bom</artifactId>
> <version>1.3.0.Final</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.selenium</groupId>
> <artifactId>selenium-bom</artifactId>
> <version>2.41.0</version>
> <type>pom</type>
> <scope>import</scope>
> </dependency>
> </dependencies>
> </dependencyManagement>
> <dependencies>
> <dependency>
> <groupId>junit</groupId>
> <artifactId>junit</artifactId>
> <version>4.11</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.junit</groupId>
> <artifactId>arquillian-junit-container</artifactId>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.hibernate</groupId>
> <artifactId>hibernate-jpamodelgen</artifactId>
> <version>4.3.5.Final</version>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.graphene</groupId>
> <artifactId>graphene-webdriver</artifactId>
> <version>2.0.2.Final</version>
> <type>pom</type>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-persistence-core</artifactId>
> <version>1.0.0.Alpha7</version>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.extension</groupId>
> <artifactId>arquillian-persistence-dbunit</artifactId>
> <version>1.0.0.Alpha7</version>
> </dependency>
> </dependencies>
> <profiles>
> <profile>
> <id>arq-wildfly</id>
> <dependencies>
> <dependency>
> <groupId>org.jboss.spec</groupId>
> <artifactId>jboss-javaee-7.0</artifactId>
> <version>1.0.0.Final</version>
> <type>pom</type>
> <scope>provided</scope>
> </dependency>
> <dependency>
> <groupId>org.wildfly</groupId>
> <artifactId>wildfly-arquillian-container-remote</artifactId>
> <version>8.1.0.CR2</version>
> <scope>test</scope>
> </dependency>
> <dependency>
> <groupId>org.jboss.arquillian.protocol</groupId>
> <artifactId>arquillian-protocol-servlet</artifactId>
> <scope>test</scope>
> </dependency>
> </dependencies>
> </profile>
> </profiles>
> <build>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>2.3.2</version>
> <configuration>
> <source>1.7</source>
> <target>1.7</target>
> </configuration>
> </plugin>
> </plugins>
> <testResources>
> <testResource>
> <directory>src/test/resources</directory>
> <filtering>true</filtering>
> </testResource>
> </testResources>
> </build>
> </project>
> {code}
> {code:java}
> package fi.affecto.marela.test;
> import javax.inject.Inject;
> import javax.persistence.EntityManager;
> import javax.persistence.PersistenceContext;
> import javax.transaction.UserTransaction;
> import org.jboss.arquillian.container.test.api.Deployment;
> import org.jboss.arquillian.junit.Arquillian;
> import org.jboss.arquillian.persistence.ShouldMatchDataSet;
> import org.jboss.arquillian.persistence.UsingDataSet;
> import org.jboss.arquillian.transaction.api.annotation.Transactional;
> import org.jboss.shrinkwrap.api.Archive;
> import org.jboss.shrinkwrap.api.ShrinkWrap;
> import org.jboss.shrinkwrap.api.asset.EmptyAsset;
> import org.jboss.shrinkwrap.api.spec.WebArchive;
> import org.junit.Assert;
> import org.junit.Test;
> import org.junit.runner.RunWith;
> import fi.affecto.marela.jpa.Game;
> @RunWith(Arquillian.class)
> public class PersistenceExtensionTest
> {
> @Deployment
> public static Archive<?> createDeployment()
> {
> return ShrinkWrap.create(WebArchive.class, "test.war").addPackage(Game.class.getPackage())
> .addAsResource("persistence.xml", "META-INF/persistence.xml")
> .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
> }
> @PersistenceContext
> EntityManager em;
> @Inject
> UserTransaction utx;
> @Test
> public void testA() throws Exception
> {
> Assert.assertNotNull(em);
> utx.begin();
> // em.joinTransaction();
> Game g = new Game();
> g.setId(666L);
> g.setTitle("x");
> Assert.assertFalse(em.contains(g));
> g = em.merge(g);
> Assert.assertTrue(em.contains(g));
> utx.rollback();
> }
>
> @Test
> @Transactional
> public void testB() throws Exception
> {
> Assert.assertNotNull(em);
> Game g = new Game();
> g.setId(666L);
> g.setTitle("x");
> Assert.assertFalse(em.contains(g));
> g = em.merge(g);
> Assert.assertTrue(em.contains(g));
> }
> @Test
> // @UsingDataSet("games.yml")
> // @ShouldMatchDataSet("games-check.yml")
> @Transactional
> public void testC() throws Exception
> {
> Assert.assertTrue(false);
> }
> }
> {code}
> testC succeeds if the annotations are uncommented.
> Furthermore, there is something strange with the em/transactions, the persistence works even if the em doesn't join the transaction and the em complains of a detached instance if merge() is switched for persist()
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (ARQ-1401) Remove dependency on SLF4J
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1401?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak closed ARQ-1401.
-------------------------------
Resolution: Won't Fix
Required by DBUnit and is only part of its module as a transitive dependency.
> Remove dependency on SLF4J
> --------------------------
>
> Key: ARQ-1401
> URL: https://issues.jboss.org/browse/ARQ-1401
> Project: Arquillian
> Issue Type: Feature Request
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6
> Reporter: Karel Piwko
> Assignee: Bartosz Majsak
>
> SLF4J dependency should be removed/replaced with JUL. Current dependency requires projects to add an slf4j compatible implementation into test dependencies.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (ARQ-1942) Duplicate PK encountered when using a ApplyScriptBefore script
by Bartosz Majsak (JIRA)
[ https://issues.jboss.org/browse/ARQ-1942?page=com.atlassian.jira.plugin.s... ]
Bartosz Majsak closed ARQ-1942.
-------------------------------
Resolution: Out of Date
> Duplicate PK encountered when using a ApplyScriptBefore script
> --------------------------------------------------------------
>
> Key: ARQ-1942
> URL: https://issues.jboss.org/browse/ARQ-1942
> Project: Arquillian
> Issue Type: Bug
> Components: Extension - Persistence
> Affects Versions: persistence_1.0.0.Alpha6, persistence_1.0.0.Alpha7
> Environment: Windows 8.1 Home, WildFly 8.2.0 Final, jdk1.8.0.40
> Reporter: Dimitrios Kordas
> Assignee: Bartosz Majsak
>
> I am trying to create tests for hibernate under WildFly 8.2.0.
> I can successfully create the war using Shrinkwrap, but when Arquillian tries to run the script i provided using the @ApplyScriptBefore annotation hibernate complains about duplicate primary keys even though all keys defined are sequential.
> I encounter this error for specific primary keys. For example 1.
> If i run the same script (only with an id of 2) multiple times it works.
> I have tested the same thing using yaml and json formats and it doesn't work either.
> INSERT INTO app_category(id, description, name) VALUES(1, 'entertainment apps', 'Entertainment');
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(1,true,'com.facebook','Facebook',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(2,true,'com.twitter','Twitter',1);
> INSERT INTO app(id,active,fqn,name,app_category_id) VALUES(3,true,'com.instagram','Instagram',1);
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months
[JBoss JIRA] (ARQ-2118) Decouple cleanup and cleanup strategy
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-2118:
-----------------------------------
Summary: Decouple cleanup and cleanup strategy
Key: ARQ-2118
URL: https://issues.jboss.org/browse/ARQ-2118
Project: Arquillian
Issue Type: Enhancement
Components: Extension - Persistence
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
As we are bringing more data storage engines in the upcoming 2.0.0 we should decouple cleanup phase and its strategy, as latter at this moment is relevant only for DBUnit
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 7 months