Giorgio Vespucci
09/05/2023, 3:13 PMSpringAutowireConstructorExtension
Vs. SpringExtension
Giorgio Vespucci
09/05/2023, 3:14 PMoverride fun extensions(): List<Extension> {
return listOf(SpringAutowireConstructorExtension)
}
…unless you intend to apply SpringExtension
to all test specs (above matches what kotest auto-configures).Giorgio Vespucci
09/05/2023, 3:14 PMChris Lee
09/05/2023, 3:19 PMSpringExtension
into the Kotest config class - that broke many other non-Spring tests.
From looking at the kotest config dump (w/ autoscan enabled) aligned on using SpringAutowireConstructorExtension
to match what kotest had previously provided.sam
09/05/2023, 3:30 PMsam
09/05/2023, 3:30 PMChris Lee
09/05/2023, 3:30 PMSpringAutowireConstructorExtension
to match what kotest had auto-discovered; see if that fixes your test-detection issue.Chris Lee
09/05/2023, 3:32 PMGiorgio Vespucci
09/06/2023, 7:07 AMSpringAutowireConstructorExtension
or as a replacement for SpringExtension
?
ThanksChris Lee
09/06/2023, 12:05 PMGiorgio Vespucci
09/06/2023, 12:25 PM~~~ Kotest Configuration ~~~
-> Parallelization factor: 10
-> Concurrent specs: null
-> Global concurrent tests: 1
-> Dispatcher affinity: true
-> Coroutine debug probe: false
-> Spec execution order: Lexicographic
-> Default test execution order: Sequential
-> Default test timeout: nullms
-> Default test invocation timeout: nullms
-> Default isolation mode: SingleInstance
-> Global soft assertions: false
-> Write spec failure file: false
-> Fail on ignored tests: false
-> Fail on empty test suite: false
-> Duplicate test name mode: Warn
-> Remove test name whitespace: false
-> Append tags to test names: false
-> Extensions
- io.kotest.engine.extensions.SystemPropertyTagExtension
- io.kotest.extensions.spring.SpringAutowireConstructorExtension
- class io.kotest.engine.config.ApplyConfigFromAbstractProjectConfigKt$applyConfigFromProjectConfig$projectListener$1
- io.kotest.extensions.spring.SpringTestExtension
- io.kotest.extensions.spring.SpringAutowireConstructorExtension
- io.kotest.runner.junit.platform.gradle.GradleClassMethodRegexTestFilter
-> Tags:
Giorgio Vespucci
09/06/2023, 12:25 PMGiorgio Vespucci
09/06/2023, 12:27 PMio.kotest.extensions.spring.SpringAutowireConstructorExtension
appears 2 times.
Maybe one of the Spring extension is redundant nowChris Lee
09/06/2023, 12:33 PMGiorgio Vespucci
09/06/2023, 12:42 PMGiorgio Vespucci
09/06/2023, 12:47 PMChris Lee
09/06/2023, 1:05 PMGiorgio Vespucci
09/06/2023, 1:07 PMGiorgio Vespucci
09/06/2023, 1:07 PMGiorgio Vespucci
09/06/2023, 1:09 PMSeems like it at least got us past the “no tests found”This happened when I switched off the
kotest.framework.classpath.scanning.config
and forced the configuration class with
kotest.framework.config.fqn
During the latest run I only switched off
kotest.framework.classpath.scanning.autoscan
Chris Lee
09/06/2023, 1:10 PMGiorgio Vespucci
09/06/2023, 1:11 PMkotest.framework.dump.config=true
kotest.framework.classpath.scanning.config.disable=true
kotest.framework.classpath.scanning.autoscan.disable=true
kotest.framework.config.fqn=***.KotestProjectConfig
Giorgio Vespucci
09/06/2023, 1:16 PM[INFO] Results:
[INFO]
[INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 01:48 min
[INFO] Finished at: 2023-09-06T15:13:16+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] There was an error in the forked process
[ERROR] TestEngine with ID 'kotest' failed to discover tests
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
[ERROR] TestEngine with ID 'kotest' failed to discover tests
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:656)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:282)
[ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
Chris Lee
09/06/2023, 1:16 PMGiorgio Vespucci
09/06/2023, 1:16 PMsam
09/06/2023, 1:21 PMsam
09/06/2023, 1:21 PMsam
09/06/2023, 1:21 PMKOTEST_DEBUG=true
sam
09/06/2023, 1:21 PMGiorgio Vespucci
09/06/2023, 1:22 PMGiorgio Vespucci
09/06/2023, 7:59 PMKOTEST_DEBUG=true
and it stopped with
[ERROR] TestEngine with ID 'kotest' failed to discover tests
[ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
🤔Giorgio Vespucci
09/08/2023, 12:35 PMYea. Need to see if a reproducer can catch this scenario.There is my public POC on GitHub. It's failing as mentioned with the pushed
kotest.properties
.
It's failing as well with -DKOTEST_DEBUG=true
Thank YouGiorgio Vespucci
09/12/2023, 5:02 PM