-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Simplify container testing #13134
Simplify container testing #13134
Conversation
Use: -Dtest-containers to enable container testing rather than all variants of -Dtest-postgresql, -Dtest-mariadb and so on -Dstart-containers to start the containers rather than -Ddocker
This is a leftover from when we used to start services rather than relying on Docker. Let's be consistent with the JVM builds and simplify all of this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very much +1 on this, the current state of affairs is a bit of a mess.
8f79c63
to
ada0170
Compare
@loicmathieu I had to keep the logging-gelf extension special cased as it doesn't automatically start the containers. That means that right now, this extension is not tested at all on CI, which is unfortunate. Any chance we could improve this situation? |
@gsmet there is already an issue for that, #6286 and it's assigned ... to you ;) Someone definilty needs to work on making the logging-gelf IT works in CI. |
Thanks for the notification @gsmet ! Could you please also explain why -Dstart-containers does not imply -Dtest-containers? |
@zakkak unfortunately, it's not easy to do that with standard Maven profiles. At least that's my understanding of it. |
Hmm, I wonder if just setting the property I was thinking about the lack of flexibility of I'll go try that and report back. |
AFAICS, it's not working. |
I think adding something like: <profile>
<id>start-containers</id>
<activation>
<property>
<name>start-containers</name>
</property>
</activation>
<properties>
<start-containers>true</start-containers>
<test-containers>true</test-containers>
</properties>
</profile> in My maven-fu is not that good though so I can't be sure without testing. |
I tried to do something similar but in a specific IT and it didn't work. Not sure if doing it in the parent would change something. |
The way I understand it it needs to be in a parent pom so that it gets evaluated earlier and thus set the I faced that same issue in #10932 (comment) |
I tried but it doesn't work. |
:( Thanks for trying it out @gsmet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fantastic! Looks like I can check the first checkbox in #11622
This is a follow-up from a discussion we had months ago. Names were suggested by @stuartwdouglas and I think they make sense.
It's a bit longer to type but at least you don't have to check in the pom if it should be
test-pgsql
ortest-postgresql
/test-mariadb
ortest-mysql
and everything is consistent.Use:
-Dtest-containers to enable container testing rather than all variants
of -Dtest-postgresql, -Dtest-mariadb and so on
-Dstart-containers to start the containers rather than -Ddocker
I also make the native builds consistently use containers.
Let's see what CI has to say.
/cc @zakkak