-
-
Notifications
You must be signed in to change notification settings - Fork 941
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SAK-50696 - LTI Fix Non-Deterministic Unit Tests #13014
Conversation
a3745d0
to
31e6678
Compare
@hermya Thanks for the patch - it looks good to me. We need to file JIRA in our issue tracker and have you fill out a Contribution Agreement. If your intent is to keep working on Sakai it would be worthwhile to go through all this effort - but if this is a one-time patch, I can take this fix over for you and do all the necessary stuff to get this into the code base. Sorry about the paperwork - open source projects need to do this. |
Hello @csev, |
I believe there is a form linked from this page to create an individual CLA: https://form.jotform.com/60435795225156 |
Found it and submitted, thanks @ottenhoff! |
@ottenhoff - The technical bits look good to me. Once this is merged, I want to apply the approach to some new tests I just wrote this weekend :) |
…ures in lti/tsugi-util
Hello All! |
I think the one last step it so make a JIRA - @ottenhoff - WDYT? |
Agree and let the tests finish running! |
Hello! |
I made a JIRA and edited the title and the CLA is applied for - so I am merging this. Thanks. |
Please try to create a new account at sakaiproject.atlassian.net, login via Google, or send your email address to ottenhoff at longsight dot com |
Fixed flaky test cases in the module:
./lti/tsugi-util/
Test-cases details
GroupService
is converted to Json, and its string representation is asserted against expected value. JSON conversion is non-deterministic, and the order of attributes can be different on different jvms, resulting in different string representationsMap
and AssertingMap-equality
, as it doesn't require matching key-orderingorg.tsugi.lti13.LTI13KeySetUtil
at Line:60,rsaKey
is being converted to a json-string, used further in a JsonObject. AsrsaKey
is a bean, its JSON conversion can result in non-deterministic string Same reason as1
Map
and AssertingMap-equality
, and a flexiblecontains
check for asserting goodness ofkeySetJSON
2
for both test-casescontains
check for asserting goodness ofkeySetJSON
1
for both test-cases1
for both test-casesFixed using NonDex
Suggested command to check all flaky tests :
For the particular test class:
For more information: https://github.com/TestingResearchIllinois/NonDex