Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1204

EAP quickstart tasks-jsf: one failing test

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 2017.6.0
    • Component/s: None
    • Labels:
      None
    • Sprint:
      2017-Mar-B, 2017-Apr-A, 2017-May-A

      Description

      There's one test in the tasks-jsf EAP quickstart that fails on Swarm, yet passes on EAP/WildFly.

      Steps to reproduce:

      1. git clone -b 7.0.x https://github.com/jboss-developer/jboss-eap-quickstarts.git
      2. cd jboss-eap-quickstarts/tasks-jsf
      3. change version.jboss.bom.eap in pom.xml to 7.0.0.GA
      4. change pom.xml to include this profile:
        <profile>
            <id>arq-wildfly-swarm</id>
            <dependencies>
                <dependency>
                    <groupId>org.wildfly.swarm</groupId>
                    <artifactId>arquillian</artifactId>
                    <version>2017.3.3</version>
                    <scope>test</scope>
                </dependency>
                <dependency>
                    <groupId>com.h2database</groupId>
                    <artifactId>h2</artifactId>
                    <version>1.4.193</version>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <version>${version.surefire.plugin}</version>
                        <configuration>
                            <systemPropertyVariables>
                                <arquillian.xml>arquillian-swarm.xml</arquillian.xml>
                            </systemPropertyVariables>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        
      5. add src/test/resources/arquillian-swarm.xml file with this content:
        <?xml version="1.0" encoding="UTF-8"?>
        <arquillian xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://jboss.org/schema/arquillian" xsi:schemaLocation="http://jboss.org/schema/arquillian http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
            <container qualifier="wildfly-swarm" default="true">
                <configuration>
                    <property name="host">localhost</property>
                    <property name="port">${swarm.arquillian.daemon.port:12345}</property>
                </configuration>
            </container>
        </arquillian>
        
      6. mvn clean test -Parq-wildfly-swarm

      With EAP/WildFly proper, all tests pass. With Swarm, one of the tests fail: ResourcesTest#facesContext_should_be_provided_from_current_context.

      The failing assertion checks that after doing FacesContext.setCurrentInstance(null), calling FacesContext.getCurrentInstance returns null. This appears to be true on EAP/WildFly, but with Swarm, the method returns com.sun.faces.config.InitFacesContext.

      This seems to be caused by some difference between WildFly and Swarm Arquillian adapters, though I couldn't pinpoint where. Both with WildFly and Swarm Arquillian adapters, the test seems to run on a thread that is different from the thread that runs the JSF initializers, so the FacesContext.threadInitContext shouldn't come to play... yet it seems it does. IDK. This is as far as I got.

      In any case, this seems to be a minor issue.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mszynkie Michal Szynkiewicz
                Reporter:
                lthon Ladislav Thon
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: