Skip to content

Commit 5d1d240

Browse files
committed
fix flaky JsonPOJOMapperTest
1 parent 461a7c4 commit 5d1d240

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vertx-core/src/test/java/io/vertx/tests/json/JsonPOJOMapperTest.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,15 @@
1212
package io.vertx.tests.json;
1313

1414
import com.fasterxml.jackson.databind.exc.InvalidFormatException;
15+
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
1516
import io.vertx.core.buffer.Buffer;
1617
import io.vertx.core.json.JsonObject;
1718
import org.junit.Test;
1819

1920
import java.time.Instant;
2021
import java.util.ArrayList;
2122
import java.util.Arrays;
23+
import java.util.LinkedHashMap;
2224
import java.util.HashMap;
2325
import java.util.List;
2426

@@ -31,10 +33,11 @@
3133
*/
3234
public class JsonPOJOMapperTest {
3335

36+
@JsonPropertyOrder({"a", "b", "c", "d", "e"})
3437
public static class MyType {
3538
public int a;
3639
public String b;
37-
public HashMap<String, Object> c = new HashMap<>();
40+
public HashMap<String, Object> c = new LinkedHashMap<>();
3841
public List<MyType> d = new ArrayList<>();
3942
public List<Integer> e = new ArrayList<>();
4043
}

0 commit comments

Comments
 (0)