quarkiverse / quarkus-primefaces

Quarkus PrimeFaces Faces (JSF) Extension
https://github.com/primefaces/primefaces
Apache License 2.0
33 stars 3 forks source link

Run integration tests in a container, enables "native" on Windows #12

Closed Karm closed 1 year ago

Karm commented 1 year ago

Fix #13

This PR enables the test suite to run the native executable in a container. AWT in GraalVM and Quarkus is not supported on Windows to an extent that would satisfy Quarkus Primefaces' needs, so the solution is to run both the build and the runtime in a Linux container.

This PR relies on changes to Quarkus to work with Podman for Windows. I have these changes in a branch: issue-31307-q-2.16. I'll open a PR to Quarkus presently.

How to test?

git clone --branch  issue-31307-q-2.16  https://github.com/Karm/quarkus.git
cd quarkus
./mvnw clean install -Dquickly
cd ..
git clone --branch q-issue-31307 https://github.com/Karm/quarkus-primefaces.git
cd quarkus-primefaces/
podman machine start
mvn clean install -Ddocker -Dnative -Dnative.surefire.skip 
       -Dquarkus.native.container-build=true -Dquarkus.container-image.build=true
       -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-mandrel-builder-image:22.3-java17
       -Dquarkus.docker.executable-name=podman
       -Dquarkus.native.container-runtime=podman
       -Dquarkus.version=2.16.999-SNAPSHOT
I tested: System Podman Docker
CentOS 8 4.0.2 :heavy_check_mark: 20.10.21 :heavy_check_mark:
Windows 10 4.1.0 :heavy_check_mark: 20.10.22 :heavy_check_mark:

The Windows run takes a very long time, ~30 minutes with Podman, ~54 minutes with Docker Desktop. It's partially due to the nested virtualization situation on my Linux laptop and also due to the sizing of the WSL2 shim that likely could have been configured better than the default.

melloware commented 1 year ago

Thank you! Should I wait to merge this until the fixes are no longer in SNAPSHOT?

melloware commented 1 year ago

@all-contributors add @Karm for bugs

allcontributors[bot] commented 1 year ago

@melloware

I've put up a pull request to add @Karm! :tada:

Karm commented 1 year ago

@melloware

Thank you! Should I wait to merge this until the fixes are no longer in SNAPSHOT? yw

I don't think you need to wait. The experience just wouldn't be good for Windows until Quarkus gets updated, but that's not a regression...