I'm trying to run @QuarkusTest in bazel tests, but PgPool proxy injection fails, any idea where to go from here? #32772
-
I'm running @QuarkusTest that connects to postgresql db and makes couple of CRUD operations. This works fine in normal maven environment. Problem comes in when I'm trying to run tests via bazel, junit5 runner. I know that bazel is not supported by quarkus so this is just an experiment. I'm able to get the to the testcontains part, where postgresql instance is started and proxy bean for PgPool is created.
Does anyone have any ideas where to go from here? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
/cc @Ladicek (arc), @manovotn (arc), @mkouba (arc), @tsegismont (reactive-sql-clients), @vietj (reactive-sql-clients) |
Beta Was this translation helpful? Give feedback.
-
I have no experience with Bazel, so take this with a bucket of salt, but looking at the exception, As a side note - Quarkus does its fair bit of class loader magic (as can be seen in this file) while setting up a test using |
Beta Was this translation helpful? Give feedback.
I have no experience with Bazel, so take this with a bucket of salt, but looking at the exception,
IllegalArgumentException
should happen when you try to set a field value that's not assignable to the field type.Now, from a quick look at Quarkus code, I assume the bean in question is this synth. bean; or rather it's client proxy since the bean is normal scoped. Either way, the resulting object should have the
PgPool
type.I'd probably start by debugging
io.quarkus.arc.impl.Reflections#writeField(...)
to try and spot what exactly is being assigned and why it causes IAE.As a side note - Quarkus does its fair bit of class loader magic (as can be seen in this file) while setting up a test u…