From 4e472b3caab59fdecfe2a666333d8e884548df2c Mon Sep 17 00:00:00 2001 From: wrongwrong Date: Sun, 2 Feb 2025 08:39:06 +0900 Subject: [PATCH] Fixing flaky test --- .../module/kotlin/test/github/Github464.kt | 24 +++++++++++++++---- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github464.kt b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github464.kt index 4a0bdc52..d9cf815e 100644 --- a/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github464.kt +++ b/src/test/kotlin/com/fasterxml/jackson/module/kotlin/test/github/Github464.kt @@ -1,5 +1,6 @@ package com.fasterxml.jackson.module.kotlin.test.github +import com.fasterxml.jackson.annotation.JsonPropertyOrder import com.fasterxml.jackson.core.JsonGenerator import com.fasterxml.jackson.databind.JsonSerializer import com.fasterxml.jackson.databind.ObjectMapper @@ -40,7 +41,20 @@ class Github464 { fun getXyzzy() = quux } - + @JsonPropertyOrder( + "foo", + "bar", + "baz", + "qux", + "quux", + "corge", + "grault", + "garply", + "waldo", + "fred", + "plugh", + "xyzzy" + ) class Poko( val foo: ValueClass, val bar: ValueClass?, @@ -97,8 +111,8 @@ class Github464 { "1" : null, "null-key" : null }, - "xyzzy" : 0, - "plugh" : 0 + "plugh" : 0, + "xyzzy" : 0 } """.trimIndent(), writer.writeValueAsString(target) @@ -139,8 +153,8 @@ class Github464 { "1" : "null-value", "null-key" : "null-value" }, - "xyzzy" : 0, - "plugh" : 0 + "plugh" : 0, + "xyzzy" : 0 } """.trimIndent(), writer.writeValueAsString(target)