-
-
Notifications
You must be signed in to change notification settings - Fork 513
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IllegalArgumentException in serenity-maven-plugin after Update to 3.2.0 #2724
Comments
That message is unfortunately not enough to go on - try running with -e to see if you can get more information. Also, run |
Our Tests often look like that:
The dependency-tree is huge and has some conflicts but I am not sure if these are critical. I ran the pipeline with
|
Try running with -e, not -X, to see if it gives a more informative stack trace. This one doesn't say anything about the actual error. |
One of the biggest changes from 3.1.x to 3.2.0 is the Selenium dependency update, which includes a lot of new classes, and a lot of old dependencies still pull in old dependencies. |
This is the only error I get, when running with -e
This is the dependency:tree:
|
There's not enough information to go on here to know what is happening - I would have to debug the code directly in your project. But if it only happens on your build server and not locally, it could be a JVM or container issue, and even this would be difficult. |
Ok thanks for digging into it with me. I did some further research and it seems that a specific gitlab-runner is causing the issue where a generic runner runs fine. Unfortunately I don't see why that should cause this issue. I was told, that the specific runner has more cpu/ram resources in order to provide a stable execution of the chrome-standalone image. We also use the remote chromedriver of that image. The funny part is, that the specific gitlab-runner works just fine with |
That's odd - 3.2.0 should use less memory, not more. |
I have same problems: |
We did not use that environment because of the newer serenity version. The reason was an odd with chromium image (https://hub.docker.com/r/selenium/standalone-chrome). They want to start it with 2 gb shm-size in their documentation. But that setting can only be made on the level of whole docker-runner and not per job/pipeline. But I think that is another story. I did not find the code-base of the serenity-maven-plugin. The one hosted on github seems to be outdated. Otherwise I would have taken a look at the diff between |
I think i have the same problem with screenplay cucumber on gitlab with a maven/chrome/driver docker and version 3.2.0. Failed to execute goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:3.2.0:aggregate (serenity-reports) on project myproject: Execution serenity-reports of goal net.serenity-bdd.maven.plugins:serenity-maven-plugin:3.2.0:aggregate failed.: IllegalArgumentException Moving back to version 3.1.x fixed the problem for me. |
Can you produce a sample project and a sample Docker or gitlab-runner configuration that reproduces this issue? |
Hi, thanks for the fast response. Atm for a starter I use this docker image: https://hub.docker.com/r/markhobson/maven-chrome/ Sorry i can't share my work project here and not sure if i have time in nearby future to provide a sample project with the same error. |
Can you provide the Docker file you are using to configure the image? |
I can assist with a minimal example. I created a fresh project inside our on-premise gitlab and pushed the serenity-junit-starter project (https://github.com/serenity-bdd/serenity-junit-starter). I removed gradle stuff and changed the compiler goal from java 16 to 11. In the
This setup failed with the error above when using a special tag
|
What is the significance of the "k8sabc" tag? |
The tag is a selector for the underlying gitlab-runner. So if we leave this tag, we use a generic-runner that all developers/pipelines use. The Edit: I took a look at the runners config and I could not find any interesting difference beside the cpu/memory settings. I will need to ask a colleague. But due to vacations it might take 14 days. |
It seems related to k8 nodes, we have the 3.2.0 running flawlessly on on site jenkins maven nodes, but switching to k8 nodes results in the same error, fallback to 3.1.20 helpts |
That would be a selenium issue then. The main change between those versions is the Selenium version. |
We don't use anything of selenium in our project and the exception is thrown in the aggregate part of the serenity maven plugin, so i might humbly object to "it's a selenium issue" ;) We will try to analyze more this week, stay tuned |
@eitzenbe In that case I have no idea what the issue could be, but if it only fails on k8 nodes, maybe something related to the k8 environment. |
I experienced the same problem. After remote debugging I found out that the problem seems to occur when the number of available CPU cores on are only 1. The value for the report threads is rounded down to 0 which results in the IllegalArgumentException for the Executors.newFixedThreadPool(...) call. See net.thucydides.core.reports.NumberOfThreads#forIO(). A work-around is to set the system property report.threads=1 in serenity.properties. |
Do you have a precise stack dump for that? |
@wakaleo here is a thread dump for my break-point, produced with the gradle aggregate task.
|
Thanks. This will be fixed in 3.2.2 |
@wakaleo Great, thanks! |
Sure |
Hi,
we are are trying to upgrade from Serenity 3.1.20 to 3.2.0. But unfortunetly the serenity-maven-plugin reports an IllegalArgumentException in its aggregate goal.
All our tests use the PageObject Model together wit JUnit5. I can not reproduce this behaviour on my local windows machine. It seems to be restricted to Test-Runs inside our GitLab-CI Infrastructure. Here we have an Alpine-Linux Docker-Image together with TemurinJDK 11 and Maven 3.8.4.
Might there be something wrong with the pom.xml?
Stacktrace:
This is our (updated) pom:
The text was updated successfully, but these errors were encountered: