[JBoss JIRA] (ARQ-1445) Spock extension emits After/Before suite before/after each specification execution
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1445?page=com.atlassian.jira.plugin.s... ]
Karel Piwko updated ARQ-1445:
-----------------------------
Summary: Spock extension emits After/Before suite before/after each specification execution (was: Spock extension emits After/Before suite after each specification execution)
> Spock extension emits After/Before suite before/after each specification execution
> ----------------------------------------------------------------------------------
>
> Key: ARQ-1445
> URL: https://issues.jboss.org/browse/ARQ-1445
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Spock TestRunner
> Affects Versions: spock_1.0.0.Beta1
> Reporter: Karel Piwko
> Assignee: Karel Piwko
> Priority: Critical
> Fix For: spock_1.0.0.next
>
>
> Current Spock integration implementation is broken w.r.t. AfterSuite/BeforeSuite.
> This leads to huge execution time and also breaks thinks that relies on being bootstrapped only once.
--
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
11 years, 5 months
[JBoss JIRA] (ARQ-1438) TestNG dataprovider with custom object return null values and duplicate output
by Claudinei Sartori (JIRA)
[ https://issues.jboss.org/browse/ARQ-1438?page=com.atlassian.jira.plugin.s... ]
Claudinei Sartori updated ARQ-1438:
-----------------------------------
Steps to Reproduce:
{code:title=Country.java|borderStyle=solid}
public class Country implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long id;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIVE)
@Column(length = ConstantsNumeric.FIVE, nullable = false, unique = true)
private String sigla;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIFTY)
@Column(length = ConstantsNumeric.FIFTY, nullable = false)
private String name;
//getters and setters
{code}
{code:title=CountryDAOTest.java|borderStyle=solid}
public class CountryDAOTest extends Arquillian {
@Deployment
public static Archive<?> createDeployment() {
File[] files = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve()
.withTransitivity().asFile();
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class).addClass(Country.class)
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class).addAsLibraries(files).addAsModule(jar);
return ear;
}
@Test(dataProvider = "dataListObject")
public void testDataProviderObject(Country country) {
Assert.assertNotNull(country);
Assert.assertNotNull(country.getName());
}
@DataProvider
public Object[][] dataListObject() {
final Country country1 = new Country();
country1.setName("Portugal");
country1.setSigla("pt");
final Country country2 = new Country();
country2.setName("Brasil");
country2.setSigla("br");
final Country country3 = new Country();
country3.setName("França");
country3.setSigla("fr");
final Object[][] data = new Object[][] {
{ country1 },
{ country2 },
{ country3 }
};
return data;
}
}
{code}
was:
{code:title=Country.java|borderStyle=solid}
public class Country implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long id;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIVE)
@Column(length = ConstantsNumeric.FIVE, nullable = false, unique = true)
private String sigla;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIFTY)
@Column(length = ConstantsNumeric.FIFTY, nullable = false)
private String name;
//getters and setters
{code}
{code:title=CountryDAOTest.java|borderStyle=solid}
public class CountryDAOTest extends Arquillian {
@Deployment
public static Archive<?> createDeployment() {
File[] files = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve()
.withTransitivity().asFile();
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class).addClass(Country.class)
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class).addAsLibraries(files).addAsModule(jar);
return ear;
}
@Test(dataProvider = "dataListObject")
public void testDataProviderObject(Country country) {
Assert.assertNotNull(country); = true | true
Assert.assertNotNull(country.getName()); = false | true
}
@DataProvider
public Object[][] dataListObject() {
final Country country1 = new Country();
country1.setName("Portugal");
country1.setSigla("pt");
final Country country2 = new Country();
country2.setName("Brasil");
country2.setSigla("br");
final Country country3 = new Country();
country3.setName("França");
country3.setSigla("fr");
final Object[][] data = new Object[][] {
{ country1 },
{ country2 },
{ country3 }
};
return data;
}
}
{code}
> TestNG dataprovider with custom object return null values and duplicate output
> ------------------------------------------------------------------------------
>
> Key: ARQ-1438
> URL: https://issues.jboss.org/browse/ARQ-1438
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JBoss AS Containers
> Affects Versions: 1.1.0.Final
> Environment: Linux Ubuntu 13.04 64 Bits
> Reporter: Claudinei Sartori
>
> Expected
> Use dataprovider with Arquillian with custom objects like using String, Integer, etc.
>
> Actual behavior
> When using a custom object with TestNG dataprovider and Arquillian the
> attributes of object return "null" and output is duplicated.
> Actual output
> {quote}
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> {quote}
> Expected output
> {quote}
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> {quote}
--
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
11 years, 5 months
[JBoss JIRA] (ARQ-1438) TestNG dataprovider with custom object return null values and duplicate output
by Claudinei Sartori (JIRA)
[ https://issues.jboss.org/browse/ARQ-1438?page=com.atlassian.jira.plugin.s... ]
Claudinei Sartori updated ARQ-1438:
-----------------------------------
Steps to Reproduce:
{code:title=Country.java|borderStyle=solid}
public class Country implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long id;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIVE)
@Column(length = ConstantsNumeric.FIVE, nullable = false, unique = true)
private String sigla;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIFTY)
@Column(length = ConstantsNumeric.FIFTY, nullable = false)
private String name;
//getters and setters
{code}
{code:title=CountryDAOTest.java|borderStyle=solid}
public class CountryDAOTest extends Arquillian {
@Deployment
public static Archive<?> createDeployment() {
File[] files = Maven.resolver().loadPomFromFile("pom.xml").importRuntimeDependencies().resolve()
.withTransitivity().asFile();
final JavaArchive jar = ShrinkWrap.create(JavaArchive.class).addClass(Country.class)
.addAsResource("test-persistence.xml", "META-INF/persistence.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class).addAsLibraries(files).addAsModule(jar);
return ear;
}
@Test(dataProvider = "dataListObject")
public void testDataProviderObject(Country country) {
Assert.assertNotNull(country); = true | true
Assert.assertNotNull(country.getName()); = false | true
}
@DataProvider
public Object[][] dataListObject() {
final Country country1 = new Country();
country1.setName("Portugal");
country1.setSigla("pt");
final Country country2 = new Country();
country2.setName("Brasil");
country2.setSigla("br");
final Country country3 = new Country();
country3.setName("França");
country3.setSigla("fr");
final Object[][] data = new Object[][] {
{ country1 },
{ country2 },
{ country3 }
};
return data;
}
}
{code}
was:
{code:title=Country.java|borderStyle=solid}
public class Country implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column
private Long id;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIVE)
@Column(length = ConstantsNumeric.FIVE, nullable = false, unique = true)
private String sigla;
@NotNull
@Size(min = ConstantsNumeric.TWO, max = ConstantsNumeric.FIFTY)
@Column(length = ConstantsNumeric.FIFTY, nullable = false)
private String name;
//getters and setters
{code}
{code:title=CountryDAOTest.java|borderStyle=solid}
public class CountryDAOTest extends Arquillian {
@Test(dataProvider = "dataListObject")
public void testDataProviderObject(Country country) {
Assert.assertNotNull(country); = true | true
Assert.assertNotNull(country.getName()); = false | true
}
@DataProvider
public Object[][] dataListObject() {
final Country country1 = new Country();
country1.setName("Portugal");
country1.setSigla("pt");
final Country country2 = new Country();
country2.setName("Brasil");
country2.setSigla("br");
final Country country3 = new Country();
country3.setName("França");
country3.setSigla("fr");
final Object[][] data = new Object[][] {
{ country1 },
{ country2 },
{ country3 }
};
return data;
}
}
{code}
> TestNG dataprovider with custom object return null values and duplicate output
> ------------------------------------------------------------------------------
>
> Key: ARQ-1438
> URL: https://issues.jboss.org/browse/ARQ-1438
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JBoss AS Containers
> Affects Versions: 1.1.0.Final
> Environment: Linux Ubuntu 13.04 64 Bits
> Reporter: Claudinei Sartori
>
> Expected
> Use dataprovider with Arquillian with custom objects like using String, Integer, etc.
>
> Actual behavior
> When using a custom object with TestNG dataprovider and Arquillian the
> attributes of object return "null" and output is duplicated.
> Actual output
> {quote}
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> {quote}
> Expected output
> {quote}
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> [stdout] (http-localhost-127.0.0.1-8080-1) Count: br.com.xxx.ejb.entity.domain.Country@1e62801
> {quote}
--
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
11 years, 5 months
[JBoss JIRA] (ARQ-1444) Oracle does not support query delimiter inside statements
by Michel Graciano (JIRA)
Michel Graciano created ARQ-1444:
------------------------------------
Summary: Oracle does not support query delimiter inside statements
Key: ARQ-1444
URL: https://issues.jboss.org/browse/ARQ-1444
Project: Arquillian
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha6
Environment: Oracle Database.
Reporter: Michel Graciano
Assignee: Bartosz Majsak
When we try to use @ApplyScriptBefore and the script file has more than one statement, we use ; as delimiter. The problem is that the delimiter is not removed from the statement before run it, so Oracle database return the following exception:
Caused by: java.sql.SQLSyntaxErrorException: ORA-00911: invalid character
--
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
11 years, 5 months
[JBoss JIRA] (ARQ-1443) @ArquillianResource ManagementClient doesn't work (AS 7)
by Ondrej Zizka (JIRA)
Ondrej Zizka created ARQ-1443:
---------------------------------
Summary: @ArquillianResource ManagementClient doesn't work (AS 7)
Key: ARQ-1443
URL: https://issues.jboss.org/browse/ARQ-1443
Project: Arquillian
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: JBoss AS Containers
Affects Versions: 1.0.4.Final
Reporter: Ondrej Zizka
{code}
@RunWith( Arquillian.class )
public class ExtActionsMigrationTest extends ExternalMigratorsTestEnv {
@ArquillianResource private ManagementClient mc;
@Test
public void testCliAction() throws Exception {
TestUtils.printTestBanner();
doTest( "CliActionTest", null, DirPreparation.NOOP );
{code}
Exception:
{code}
Caused by: java.lang.RuntimeException: Provider for type class org.jboss.as.arquillian.container.ManagementClient returned a null value: org.jboss.as.arquillian.container.ManagementClientProvider@72bd402d
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.lookup(ArquillianResourceTestEnricher.java:115)
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:57)
at org.jboss.arquillian.test.impl.TestInstanceEnricher.enrich(TestInstanceEnricher.java:52)
at org.jboss.arquillian.container.test.impl.ClientTestInstanceEnricher.enrich(ClientTestInstanceEnricher.java:51)
...
{code}
I'm using:
{code}
<dependency>
<groupId>org.jboss.arquillian.junit</groupId>
<artifactId>arquillian-junit-container</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jboss.as</groupId>
<artifactId>jboss-as-arquillian-container-managed</artifactId>
<version>${arq.asContainer.version}</version>
<scope>test</scope>
<exclusions><exclusion> <artifactId>jbosgi-spi</artifactId> <groupId>org.jboss.osgi.spi</groupId></exclusion> </exclusions>
</dependency>
{code}
JBoss EAP comes from org.jboss.as:jboss-as-dist:${as.download.version}:zip
Whole container config is below.
{code}
<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">${basedir}/target/as-dist</property>
<!--
<property name="javaVmArguments">${arq.as.jvm.args} -Djboss.inst=${basedir}/target/jboss-as-7.1.1.Final</property>
${arq.as.jvm.args[:]} doesn't work.
I think Arquillian splits it by spaces and then passes "" to JVM,
which then fails with "Error: Could not find or load main class ". Lame.
-->
<property name="javaVmArguments">-Djboss.inst=${basedir}/target/jboss-as-7.1.1.Final</property>
<property name="serverConfig">${jboss.server.config.file.name:standalone.xml}</property>
<property name="allowConnectingToRunningServer">true</property>
<property name="managementAddress">${node0:127.0.0.1}</property>
<property name="managementPort">${as.managementPort:9999}</property>
<!-- AS7-4070 -->
<property name="waitForPorts">${as.debug.port:8787} ${as.managementPort:9999}</property>
<property name="waitForPortsTimeoutInSeconds">8</property>
</configuration>
</container>
{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
11 years, 5 months