Skip to content

Commit e331e25

Browse files
author
xinying7
committed
fix flaky test serializeLongMapProperty
1 parent 62fe94e commit e331e25

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

modules/swagger-core/src/test/java/io/swagger/v3/core/serialization/properties/PropertySerializationTest.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,11 @@ public void deserializeIntegerMapProperty() throws IOException {
202202
@Test(description = "it should serialize a long MapProperty")
203203
public void serializeLongMapProperty() throws IOException {
204204
final Schema p = new MapSchema().additionalProperties(new IntegerSchema().format("int64"));
205-
final String json = "{\"type\":\"object\",\"additionalProperties\":{\"type\":\"integer\",\"format\":\"int64\"}}";
206-
assertEquals(m.writeValueAsString(p), json);
205+
final String json1 = "{\"type\":\"object\",\"additionalProperties\":{\"type\":\"integer\",\"format\":\"int64\"}}";
206+
String json2 = m.writeValueAsString(p);
207+
JSONObject jsonObj1 = new JSONObject(json1);
208+
JSONObject jsonObj2 = new JSONObject(json2);
209+
JSONAssert.assertEquals(jsonObj1, jsonObj2, true);
207210
}
208211

209212
@Test(description = "it should deserialize a long MapProperty")

0 commit comments

Comments
 (0)