[arquillian-issues] [JBoss JIRA] (ARQ-1908) Test functions called N^2 times for a N-sized "where:" block

Vladislav Mikerin (JIRA) issues at jboss.org
Wed Jan 28 11:38:49 EST 2015


     [ https://issues.jboss.org/browse/ARQ-1908?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladislav Mikerin updated ARQ-1908:
-----------------------------------
    Steps to Reproduce: 
Here is a simple example:

@RunWith(ArquillianSputnik)
class MySpec extends Specification{

  @Deployment
    public static Archive<?> "create deployment"() {
        return ShrinkWrap.create(WebArchive.class,  "test.war")
            .addPackage(MySpec.class.getPackage())
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    }    
    

 def test() {
   when: 
      println i;
   then:
      i == i;
   where:
      i << (1..2);
 }
}

Output:
13:01:14,287 INFO stdout 1
13:01:14,350 INFO stdout 2
13:01:14,689 INFO stdout 1
13:01:14,778 INFO stdout 2


  was:
Here is a simple example:

@RunWith(ArquillianSputnik)
class MySpec extends Specification{

  @Deployment
    public static Archive<?> "create deployment"() {
        return ShrinkWrap.create(WebArchive.class,  "test.war")
            .addPackage(MySpec.class.getPackage())
            .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml");
    }    
    

 def test() {
   when: 
      println i;
   then:
      i == 1;
   where:
      i << (1..2);
 }
}

Output:
13:01:14,287 INFO stdout 1
13:01:14,350 INFO stdout 2
13:01:14,689 INFO stdout 1
13:01:14,778 INFO stdout 2




> Test functions called N^2 times for a N-sized "where:" block
> ------------------------------------------------------------
>
>                 Key: ARQ-1908
>                 URL: https://issues.jboss.org/browse/ARQ-1908
>             Project: Arquillian
>          Issue Type: Bug
>          Components: Spock TestRunner
>    Affects Versions: spock_1.0.0.Beta3
>         Environment: Linux, JBoss 6.3 EAP, Arquillian 1.1.5.Final
>            Reporter: Vladislav Mikerin
>            Assignee: Bartosz Majsak
>            Priority: Minor
>
> Test functions called N^2 times for a "where:" spock block,
> where N is a size of the "where:" block.
> I think the framework iterates twice over the "where: " block. 
> First on a client side and then in a container (for each iteration on the client side).



--
This message was sent by Atlassian JIRA
(v6.3.11#6341)


More information about the arquillian-issues mailing list