Skip to content

Commit

Permalink
Fix flaky test in CustomTypeAdaptersTest
Browse files Browse the repository at this point in the history
  • Loading branch information
219sansim committed Nov 3, 2023
1 parent e685705 commit 38d3ca7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,8 @@ public void testCustomNestedSerializers() {
}
}).create();
ClassWithCustomTypeConverter target = new ClassWithCustomTypeConverter();
assertThat(gson.toJson(target)).isEqualTo("{\"bag\":6,\"value\":10}");
String targetStr = gson.toJson(target);
assertThat(targetStr.equals("{\"bag\":6,\"value\":10}") || targetStr.equals("{\"value\":10,\"bag\":6}")).isTrue();
}

@Test
Expand Down

0 comments on commit 38d3ca7

Please sign in to comment.