albfernandez / richfaces

RichFaces - JSF component framework
GNU Lesser General Public License v2.1
16 stars 7 forks source link

Make smoke tests work again #57

Closed saknopper closed 3 years ago

saknopper commented 3 years ago

Eventually this should fix #53

I've updated related dependencies and adjusted the code to make it compile again. Now I'm getting this error:

[ERROR] org.richfaces.integration.partialResponse.ITStatelessViews  Time elapsed: 0.007 s  <<< ERROR!
java.lang.IllegalStateException: The driver executable does not exist: ...

Though it actually downloaded and extracted the driver right before that. That is for another day to fix though :)

saknopper commented 3 years ago

This is ready for review now :)

albfernandez commented 3 years ago

Hi I'm trying but it fails. Is it necessary to do some setup previous to run mvn clean install -Dintegration=wildfly81 -Dsmoke ?

saknopper commented 3 years ago

That command should be enough and works for me.

What errors are you getting?

edit: I assume you're running on Linux?

albfernandez commented 3 years ago

Yes, I'm running on Debian Linux

mkdir /tmp/test/
cd /tmp/test/
git clone https://github.com/saknopper/richfaces.git
cd richfaces/
git checkout fix-integration-tests
mvn clean install -Dintegration=wildfly81 -Dsmoke
09:17:12,640 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 1462ms - Started 184 of 233 services (81 services are lazy, passive or on-demand)
[INFO] Running org.richfaces.integration.partialResponse.ITStatelessViews
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 s <<< FAILURE! - in org.richfaces.integration.partialResponse.ITStatelessViews
[ERROR] org.richfaces.integration.partialResponse.ITStatelessViews  Time elapsed: 0.009 s  <<< ERROR!
java.lang.IllegalStateException: The driver executable does not exist: /tmp/test/richfaces/core/target/drone/1c947d57fce2f21ce0b43fe2ed7cd361/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
    at com.google.common.base.Preconditions.checkState(Preconditions.java:591)
    at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:136)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:245)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:181)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:74)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:37)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:127)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:38)
    at org.jboss.arquillian.drone.impl.DroneConfigurator$1.createInstance(DroneConfigurator.java:112)
    at org.jboss.arquillian.drone.impl.CachingCallableImpl.call(CachingCallableImpl.java:44)
    at org.jboss.arquillian.core.impl.threading.ThreadedExecutorService$ContextualCallable.call(ThreadedExecutorService.java:88)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
saknopper commented 3 years ago

Ah, that's strange. That's actually the last thing I had to change to make things work for me.

Right above that error should also be a line that says where the phantomjs binary is extracted. Something like

May 07, 2021 10:30:52 AM org.jboss.arquillian.drone.webdriver.binary.BinaryFilesUtils extract
INFO: Extracting zip file: /home/sander/.arquillian/drone/phantomjs/2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 to target/drone/1c947d57fce2f21ce0b43fe2ed7cd361

What does it say in your case?

albfernandez commented 3 years ago

those lines doesn't appear in my log

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
may 07, 2021 9:17:10 AM org.richfaces.arquillian.container.installation.ContainerInstaller unpackContainerDistribution
INFORMACIÓN: The container distribution will be resolved from Maven artifact 'org.wildfly:wildfly-dist:zip:8.1.0.Final'
may 07, 2021 9:17:11 AM org.richfaces.arquillian.container.installation.ContainerInstaller unpackContainerDistribution
INFORMACIÓN: The container distribution 'org.wildfly:wildfly-dist:zip:8.1.0.Final' was installed into '/tmp/test/richfaces/core/target'
may 07, 2021 9:17:11 AM org.jboss.arquillian.drone.webdriver.factory.remote.reusable.ReusedSessionPermanentFileStorage readStore
INFORMACIÓN: Reused session store is not available at /home/alberto/.drone-webdriver-session-store, a new one will be created.
may 07, 2021 9:17:11 AM org.jboss.as.arquillian.container.managed.ManagedDeployableContainer startInternal
INFORMACIÓN: Starting container with: [/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java, -Xmx768m, -XX:MaxPermSize=256m, -ea, -Djboss.home.dir=/tmp/test/richfaces/core/target/wildfly-8.1.0.Final, -Dorg.jboss.boot.log.file=/tmp/test/richfaces/core/target/wildfly-8.1.0.Final/standalone/log/server.log, -Dlogging.configuration=file:/tmp/test/richfaces/core/target/wildfly-8.1.0.Final/standalone/configuration/logging.properties, -Djboss.bundles.dir=/tmp/test/richfaces/core/target/wildfly-8.1.0.Final/bundles, -jar, /tmp/test/richfaces/core/target/wildfly-8.1.0.Final/jboss-modules.jar, -mp, /tmp/test/richfaces/core/target/wildfly-8.1.0.Final/modules, org.jboss.as.standalone, -server-config, standalone.xml]
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
0    [main] INFO  org.xnio  - XNIO version 3.2.2.Final
90   [main] INFO  org.xnio.nio  - XNIO NIO Implementation Version 3.2.2.Final
157  [main] INFO  org.jboss.remoting  - JBoss Remoting version 4.0.3.Final
09:17:11,393 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.3.Final
09:17:11,546 INFO  [org.jboss.msc] (main) JBoss MSC version 1.2.2.Final
09:17:11,585 INFO  [org.jboss.as] (MSC service thread 1-7) JBAS015899: WildFly 8.1.0.Final "Kenny" starting
09:17:12,130 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creating http management service using socket-binding (management-http)
09:17:12,143 INFO  [org.xnio] (MSC service thread 1-7) XNIO version 3.2.2.Final
09:17:12,149 INFO  [org.xnio.nio] (MSC service thread 1-7) XNIO NIO Implementation Version 3.2.2.Final
09:17:12,169 INFO  [org.jboss.remoting] (MSC service thread 1-7) JBoss Remoting version 4.0.3.Final
09:17:12,169 INFO  [org.wildfly.extension.io] (ServerService Thread Pool -- 31) WFLYIO001: Worker 'default' has auto-configured to 16 core threads with 128 task threads based on your 8 available processors
09:17:12,173 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 32) JBAS010280: Activating Infinispan subsystem.
09:17:12,184 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 38) JBAS012615: Activated the following JSF Implementations: [main]
09:17:12,184 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 40) JBAS011800: Activating Naming Subsystem
09:17:12,187 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 45) JBAS013171: Activating Security Subsystem
09:17:12,195 WARN  [org.jboss.as.txn] (ServerService Thread Pool -- 46) JBAS010153: Node identifier property is set to the default value. Please make sure it is unique.
09:17:12,199 INFO  [org.jboss.as.security] (MSC service thread 1-12) JBAS013170: Current PicketBox version=4.0.21.Beta1
09:17:12,213 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
09:17:12,215 INFO  [org.jboss.as.naming] (MSC service thread 1-15) JBAS011802: Starting Naming Service
09:17:12,216 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-15) JBAS015400: Bound mail session [java:jboss/mail/Default]
09:17:12,220 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-15) JBAS010408: Starting JCA Subsystem (IronJacamar 1.1.5.Final)
09:17:12,226 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-8) JBAS017502: Undertow 1.0.15.Final starting
09:17:12,226 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
09:17:12,228 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-4) JBAS010417: Started Driver service with driver-name = h2
09:17:12,240 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017502: Undertow 1.0.15.Final starting
09:17:12,327 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 47) JBAS017527: Creating file handler for path /tmp/test/richfaces/core/target/wildfly-8.1.0.Final/welcome-content
09:17:12,331 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-12) JBAS017525: Started server default-server.
09:17:12,340 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-5) JBAS017531: Host default-host starting
09:17:12,382 INFO  [org.wildfly.extension.undertow] (MSC service thread 1-12) JBAS017519: Undertow HTTP listener default listening on /127.0.0.1:8080
09:17:12,468 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-15) JBAS015012: Started FileSystemDeploymentService for directory /tmp/test/richfaces/core/target/wildfly-8.1.0.Final/standalone/deployments
09:17:12,496 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-8) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
09:17:12,600 INFO  [org.jboss.ws.common.management] (MSC service thread 1-1) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.4.Final
09:17:12,639 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
09:17:12,640 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
09:17:12,640 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.1.0.Final "Kenny" started in 1462ms - Started 184 of 233 services (81 services are lazy, passive or on-demand)
[INFO] Running org.richfaces.integration.partialResponse.ITStatelessViews
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.02 s <<< FAILURE! - in org.richfaces.integration.partialResponse.ITStatelessViews
[ERROR] org.richfaces.integration.partialResponse.ITStatelessViews  Time elapsed: 0.009 s  <<< ERROR!
java.lang.IllegalStateException: The driver executable does not exist: /tmp/test/richfaces/core/target/drone/1c947d57fce2f21ce0b43fe2ed7cd361/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
    at com.google.common.base.Preconditions.checkState(Preconditions.java:591)
    at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:136)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:245)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:181)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:74)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:37)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:127)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:38)
    at org.jboss.arquillian.drone.impl.DroneConfigurator$1.createInstance(DroneConfigurator.java:112)
    at org.jboss.arquillian.drone.impl.CachingCallableImpl.call(CachingCallableImpl.java:44)
    at org.jboss.arquillian.core.impl.threading.ThreadedExecutorService$ContextualCallable.call(ThreadedExecutorService.java:88)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

[INFO] Running org.richfaces.integration.javascript.ITJavaScriptServiceAjax
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.001 s <<< FAILURE! - in org.richfaces.integration.javascript.ITJavaScriptServiceAjax
[ERROR] org.richfaces.integration.javascript.ITJavaScriptServiceAjax  Time elapsed: 0.001 s  <<< ERROR!
java.lang.IllegalStateException: The driver executable does not exist: /tmp/test/richfaces/core/target/drone/1c947d57fce2f21ce0b43fe2ed7cd361/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
    at com.google.common.base.Preconditions.checkState(Preconditions.java:591)
    at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:136)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.findPhantomJS(PhantomJSDriverService.java:245)
    at org.openqa.selenium.phantomjs.PhantomJSDriverService.createDefaultService(PhantomJSDriverService.java:181)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:74)
    at org.jboss.arquillian.drone.webdriver.factory.PhantomJSDriverFactory.createInstance(PhantomJSDriverFactory.java:37)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:127)
    at org.jboss.arquillian.drone.webdriver.factory.WebDriverFactory.createInstance(WebDriverFactory.java:38)
    at org.jboss.arquillian.drone.impl.DroneConfigurator$1.createInstance(DroneConfigurator.java:112)
    at org.jboss.arquillian.drone.impl.CachingCallableImpl.call(CachingCallableImpl.java:44)
    at org.jboss.arquillian.core.impl.threading.ThreadedExecutorService$ContextualCallable.call(ThreadedExecutorService.java:88)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)
saknopper commented 3 years ago

I've created a clean Debian VM:

"Debian GNU/Linux 10 (buster)"

sander@debian:~/richfaces$ mvn -version
Apache Maven 3.6.0
Maven home: /usr/share/maven
Java version: 1.8.0_292, vendor: AdoptOpenJDK, runtime: /usr/lib/jvm/adoptopenjdk-8-hotspot-amd64/jre
Default locale: en_US, platform encoding: UTF-8

Using the following command:

env OPENSSL_CONF=/etc/ssl/ mvn clean install -Dintegration=wildfly81 -Dsmoke -Dgpg.skip

It seems to work fine:

Drone: downloading phantomjs-2.1.1-linux-x86_64.tar.bz2 from https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 to /home/sander/.arquillian/drone/phantomjs/2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 
............................................
May 07, 2021 12:36:01 PM org.jboss.arquillian.drone.webdriver.binary.BinaryFilesUtils extract
INFO: Extracting zip file: /home/sander/.arquillian/drone/phantomjs/2.1.1/phantomjs-2.1.1-linux-x86_64.tar.bz2 to target/drone/1c947d57fce2f21ce0b43fe2ed7cd361
May 07, 2021 12:36:04 PM org.openqa.selenium.phantomjs.PhantomJSDriverService <init>
INFO: executable: /home/sander/richfaces/core/target/drone/1c947d57fce2f21ce0b43fe2ed7cd361/phantomjs-2.1.1-linux-x86_64/bin/phantomjs
[INFO] Reactor Summary for RichFaces Parent 4.6.14-SNAPSHOT:
[INFO] 
[INFO] RichFaces BOM ...................................... SUCCESS [  0.389 s]
[INFO] RichFaces Build Version Management ................. SUCCESS [  0.022 s]
[INFO] RichFaces Build Resources .......................... SUCCESS [  4.884 s]
[INFO] RichFaces Parent ................................... SUCCESS [  1.024 s]
[INFO] RichFaces Page Fragments ........................... SUCCESS [  5.992 s]
[INFO] RichFaces Core ..................................... SUCCESS [01:43 min]
[INFO] RichFaces UI Components Parent ..................... SUCCESS [  0.101 s]
[INFO] RichFaces a4j components ........................... SUCCESS [ 41.161 s]
[INFO] RichFaces Resources Maven Plugin ................... SUCCESS [  3.330 s]
[INFO] RichFaces rich components .......................... SUCCESS [05:02 min]
[INFO] RichFaces Push Depchain ............................ SUCCESS [  0.044 s]
[INFO] RichFaces Push Native Depchain ..................... SUCCESS [  1.851 s]
[INFO] RichFaces Distribution Assembler ................... SUCCESS [  0.059 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
albfernandez commented 3 years ago

Finally I success with a clean debian in a new virtual machine

albfernandez commented 3 years ago

Thanks