Skip to content

Commit 95af775

Browse files
authored
Merge pull request #804 from k163377/fix-tests
Fix tests
2 parents 10b3b31 + fafc8ae commit 95af775

File tree

6 files changed

+21
-48
lines changed

6 files changed

+21
-48
lines changed

.github/workflows/dep_build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
java_version: ['8', '17', '21']
18+
java_version: ['8', '17', '21', '22']
1919
# Versions need to align with ones in 'main.yml' workflow
2020
# kotlin-reflect 1.8.2x has a bug and some tests fail, so we are downgrading to 1.8.10.
2121
# https://youtrack.jetbrains.com/issue/KT-65156
22-
kotlin_version: ['1.8.10', '1.9.23', '2.0.0-Beta4']
22+
kotlin_version: ['1.8.10', '1.9.23', '2.0.0']
2323
os: ['ubuntu-22.04']
2424
env:
2525
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"

.github/workflows/main.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ jobs:
3030
java_version: ['8', '11', '17', '21', '22']
3131
# kotlin-reflect 1.8.2x has a bug and some tests fail, so we are downgrading to 1.8.10.
3232
# https://youtrack.jetbrains.com/issue/KT-65156
33-
# kotlin-reflect 2.0.0-Beta5 is not used because of KT-67209
34-
kotlin_version: ['1.8.10', '1.9.23', '2.0.0-Beta4']
33+
kotlin_version: ['1.8.10', '1.9.23', '2.0.0']
3534
include:
3635
- java_version: '8'
3736
kotlin_version: '1.8.10'

src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/parameterSize/nonNullObject/DeserializeByConstructorWithDefaultArgumentsTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
5050
val p31: NonNullObject = NonNullObject("31")
5151
)
5252

53-
// #762
5453
@Test(expected = KotlinReflectionInternalError::class)
5554
fun test32() {
5655
assertEquals(Dst32(), defaultMapper.readValue<Dst32>("{}"))
56+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
57+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
58+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
5759
}
5860

5961
data class Dst33(
@@ -164,10 +166,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
164166
val p63: NonNullObject = NonNullObject("63")
165167
)
166168

167-
// #762
168169
@Test(expected = KotlinReflectionInternalError::class)
169170
fun test64() {
170171
assertEquals(Dst64(), defaultMapper.readValue<Dst64>("{}"))
172+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
173+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
174+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
171175
}
172176

173177
data class Dst65(

src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/parameterSize/nullableObject/DeserializeByConstructorWithDefaultArgumentsTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
5050
val p31: NullableObject? = NullableObject("31")
5151
)
5252

53-
// #762
5453
@Test(expected = KotlinReflectionInternalError::class)
5554
fun test32() {
5655
assertEquals(Dst32(), defaultMapper.readValue<Dst32>("{}"))
56+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
57+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
58+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
5759
}
5860

5961
data class Dst33(
@@ -164,10 +166,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
164166
val p63: NullableObject? = NullableObject("63")
165167
)
166168

167-
// #762
168169
@Test(expected = KotlinReflectionInternalError::class)
169170
fun test64() {
170171
assertEquals(Dst64(), defaultMapper.readValue<Dst64>("{}"))
172+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
173+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
174+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
171175
}
172176

173177
data class Dst65(

src/test/kotlin/com/fasterxml/jackson/module/kotlin/kogeraIntegration/deser/valueClass/parameterSize/primitive/DeserializeByConstructorWithDefaultArgumentsTest.kt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
5050
val p31: Primitive = Primitive(31)
5151
)
5252

53-
// #762
5453
@Test(expected = KotlinReflectionInternalError::class)
5554
fun test32() {
5655
assertEquals(Dst32(), defaultMapper.readValue<Dst32>("{}"))
56+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
57+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
58+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
5759
}
5860

5961
data class Dst33(
@@ -164,10 +166,12 @@ class DeserializeByConstructorWithDefaultArgumentsTest {
164166
val p63: Primitive = Primitive(63)
165167
)
166168

167-
// #762
168169
@Test(expected = KotlinReflectionInternalError::class)
169170
fun test64() {
170171
assertEquals(Dst64(), defaultMapper.readValue<Dst64>("{}"))
172+
// TODO: #762 is resolved after Kotlin 2.0, so the reason why throw is done is to make CI with Kotlin 2.0 succeed.
173+
// After upgrading to Kotlin 2.0, remove exception-related descriptions.
174+
if (KotlinVersion.CURRENT.major >= 2) throw KotlinReflectionInternalError("")
171175
}
172176

173177
data class Dst65(

src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/failing/Github145Failing.kt

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)