Open oztimpower opened 4 years ago
Yeah... I was sort of afraid this would happen...
Actually for the native test we can't pull of the same trick, because there isn't a JVM running from which we can use CDI to pull the bean.
@stuartwdouglas I have been meaning to discusss with you about similar issues. Basically how we can launch a JVM version of the application for the sole purpose of pulling beans out of Arc and injecting them into native tests
Description Per #7508 the Jackson ObjectMapper was enhanced to keep the Arc configuration for Kotlin, i.e. use the Kotlin ObjectMapper.
Request the same for the NativeImage, when used in conjunction with @NativeImageTest. When the native image is deployed with SAM or on AWS, it works ok - Kotlin data class is able serialize.
Implementation ideas Only affects @NativeImageTest. test package, LambdaClient.invoke is what is not working.
A similar ObjectMapper update to acknowledge the Kotlin configuration required.
Reproduceable via: git clone https://github.com/oztimpower/kotlin-lambda.git mvn package -Dnative Execute JUnit @NativeImageTest via IDE (IntelliJ)
999-SNAPSHOT - head revision used @geoand