Skip to content

Commit

Permalink
LPS-201793 Update flaky test
Browse files Browse the repository at this point in the history
  • Loading branch information
magjed4289 authored and brianchandotcom committed Dec 18, 2023
1 parent 219118b commit 0cfcadc
Showing 1 changed file with 28 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4945,12 +4945,20 @@ public void testPostCustomObjectEntryWithNestedCustomObjectEntriesInManyToManyRe

Assert.assertEquals(2, nestedObjectEntriesJSONArray.length());

_assertObjectEntryField(
(JSONObject)nestedObjectEntriesJSONArray.get(0),
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_1);
_assertObjectEntryField(
(JSONObject)nestedObjectEntriesJSONArray.get(1),
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_2);
JSONAssert.assertEquals(
JSONUtil.putAll(
JSONUtil.put(
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_1
).put(
"externalReferenceCode", _ERC_VALUE_1
),
JSONUtil.put(
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_2
).put(
"externalReferenceCode", _ERC_VALUE_2
)
).toString(),
nestedObjectEntriesJSONArray.toString(), JSONCompareMode.LENIENT);

objectEntryId = jsonObject.getString("id");

Expand All @@ -4967,12 +4975,20 @@ public void testPostCustomObjectEntryWithNestedCustomObjectEntriesInManyToManyRe

Assert.assertEquals(2, nestedObjectEntriesJSONArray.length());

_assertObjectEntryField(
(JSONObject)nestedObjectEntriesJSONArray.get(0),
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_1);
_assertObjectEntryField(
(JSONObject)nestedObjectEntriesJSONArray.get(1),
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_2);
JSONAssert.assertEquals(
JSONUtil.putAll(
JSONUtil.put(
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_1
).put(
"externalReferenceCode", _ERC_VALUE_1
),
JSONUtil.put(
_OBJECT_FIELD_NAME_2, _NEW_OBJECT_FIELD_VALUE_2
).put(
"externalReferenceCode", _ERC_VALUE_2
)
).toString(),
nestedObjectEntriesJSONArray.toString(), JSONCompareMode.LENIENT);
}

@Test
Expand Down

0 comments on commit 0cfcadc

Please sign in to comment.