amazon-pay-api-sdk-java icon indicating copy to clipboard operation
amazon-pay-api-sdk-java copied to clipboard

GenerateButtonSignatureTest.testButtonSignatureWithJSONObject is a flaky buttom

Open TheGreatRandall opened this issue 3 years ago • 0 comments

Issue #, if available: The testButtonSignatureWithJSONObject() test can not pass the nondex(https://github.com/TestingResearchIllinois/NonDex) check. The problem is the data inside the JSON variable is non-deterministic and can't guarentee the consistance of output string.

Description of changes: I assertequal the JSONObject instead of String. I use the String is given in testButtonSignatureWithString function to build a JSON object. And using JSONObject.similar(JSONObject) to check the payload

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

TheGreatRandall avatar Dec 10 '22 19:12 TheGreatRandall