kotlinx.serialization icon indicating copy to clipboard operation
kotlinx.serialization copied to clipboard

Setup running native tests in release mode

Open whyoleg opened this issue 1 year ago • 0 comments

Proposed here: https://github.com/Kotlin/kotlinx.serialization/issues/2608#issuecomment-2077438394

PR can be merged only after update Kotlin to 1.9.24 because of failing tests

To run native tests in release mode, separate tasks are created by KGP for additional test runs, f.e macosArm64ReleaseTest or linuxX64ReleaseTest. By default, they will be run also on build, check and allTests tasks, so they should automatically run on TC.

Note: the original issue (#2608) doesn't reproduce nor via running protobuf tests (which contains tests for inner classes, so I haven't added additional test from original issue), nor via running tests in integration-test module (by adding reproducer test there, not included)

But another tests fail on current dev:

  • kotlinx.serialization.json.polymorphic.JsonListPolymorphismTest#testPolymorphicNullableValues
  • kotlinx.serialization.json.polymorphic.JsonMapPolymorphismTest#testPolymorphicNullableValues

With the same exception:

kotlinx.serialization.json.internal.JsonDecodingException: Expected class kotlinx.serialization.json.JsonArray as the serialized body of kotlinx.serialization.Polymorphic<InnerBase>, but had class kotlinx.serialization.json.JsonObject

If to update Kotlin version in project to 1.9.24 - those tests are now finish successfully.

whyoleg avatar May 09 '24 08:05 whyoleg