Repository navigation
Quarkus test support - #6820
Quarkus test support#6820
Conversation
e29b28e to
1108de8
Compare
|
I've managed to make tests work with a caveat, we need to implement a new // TODO implement a new discoveredTestClasses for Quarkus
override def discoveredTestClasses: T[Seq[String]] = Task {
val worker = jvmWorker().internalWorker()
worker.apply(
mill.javalib.api.internal.ZincOp.DiscoverJunit5Tests(
runClasspath().map(_.path),
testClasspath().map(_.path),
classesDir()
),
javaHome().map(_.path),
javaRuntimeOptions = forkArgs()
)
}The above passes the quarkus bootstrapping because the fork args cause the worker to spin a new process but the classloader is not behaving properly resulting in a even though I manually tested that this constructor can be found in For now I stubbed it and I'll try to implement a fresh one for Quarkus and either I'll figure out where the conflict happens or we use the fresh for quarkus modules |
|
with the latest commit we are there for the quarkus test support (at least junit example working) I'll add scaladocs and add the example into the mill docs and if I have time and the native-tests work out I'll add those too otherwise on a future PR. The only trouble was separating the classpaths/making the discovery classpath work, but thankfully it can accept java opts, which I introduced with a new Please have an initial review if you have the time @lihaoyi @lefou and I'll take your feedback in mind when I finalise the PR. |
aee1461 to
a3a38fd
Compare
Part of #3549 and #6496
Quarkus Test support feature
DiscoverJunit5TestsZincOp is not working but it works with running a forked jvm with the classpath of the runtime classpath (so the QuarkusTest annotation is detected and works).testDiscoverRuntimeOptionsfor easier integration with the TestModule instead of overriding the whole discoveredTestClasses.Other fixes
I've noticed that springboot todo started failing with a docker environment not found error. Probably some update in docker as I updated the deps and (at least locally) it seems fine now:
What is not supported yet
Future PRs
For the native builds tests, I've started a separate work, I think it's close, just missing something to cause the augmented result to generate a native build too.
Also, quarkus has a lot into it, so perhaps in the future we can have a dedicated page like we do with SpringBoot