-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Enable dev services for all named mongodb-client connections #26011
Conversation
Interesting follow up question here (and perhaps a change of direction): in order to create a named client, there has to be something in |
Probably, but I am thinking that it might break stuff, so I would like to avoid it. |
import io.smallrye.common.annotation.Blocking; | ||
|
||
@Path("/books") | ||
@Blocking | ||
public class BookResource { | ||
|
||
@Inject | ||
@MongoClientName("parameter-injection") |
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.
I think we need the test to have both named and non-named clients
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.
+1
Do we have a way to access the devservices information from a test to check that 2 devservices has been started ? The default and the named one ?
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.
The default client is injected in PojoResource
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.
we can have only one unnamed client and that will have to be done either via dev services or MTR
. I pushed a different config that uses MTR
for the default and a named one and two named clients using dev services. This covers, i think, all the combos except for default via dev services. I've verified this "manually" but because the config has to be this or way that, it's not "permanently" configured this way.
actually, the more i think about this the less i like it. typos would be a nightmare. (even though those names should be held in constants somewhere. ;) ) |
bump |
The affected test is not using dev services as the connection string has been set - mongo is being spun up by |
integration-tests/mongodb-client/src/main/resources/application.properties
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
integration-tests/mongodb-client/src/main/java/io/quarkus/it/mongodb/BookResource.java
Show resolved
Hide resolved
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.
LGTM!
This comment has been minimized.
This comment has been minimized.
Hm... The test failure is suspicious |
This comment has been minimized.
This comment has been minimized.
No docker on CI ... |
@evanchooly there is no docker on Windows CI. That's why we don't use testcontainers for MongoDB tests but the testresource. But even the testresource didn't works very well on Windows due to some issue on flapdoodle side so we ends up disabling the test on Windows: |
But you didn't add new tests so I don't understand why you have this ... |
Probably because: <plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin> was removed |
fixed the windows failure by disabling it via a profile when on windows. the last CI run was all green so I squashed the commits and force pushed. we should be all good to go now. |
It seems this PR has broken The failsafe-skip-profile won't work for those as both are run via surefire. |
Yup, @evanchooly is looking into it |
fixes #25278