Skip to content

Conversation

@chrnndz3
Copy link
Contributor

18 tests from com.alibaba.innodb.java.reader.sk.SimpleSkTableReaderTest are flaky.

If java.lang.Object.getDeclaredFields() returns the fields in a different order multiple tests could fail. This PR ensures that the tests pass even if the order changes.

To guarantee the ordering of com.alibaba.innodb.java.reader.getAllRows(...), I've added annotations, PR: #14, to Employee class and Department class to sort the fields by their annotated values.

As per https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredFields--
"The elements in the returned array are not sorted and are not in any particular order."

@CLAassistant
Copy link

CLAassistant commented Dec 12, 2020

CLA assistant check
All committers have signed the CLA.

@codecov-io
Copy link

Codecov Report

Merging #15 (526892c) into master (24a95d8) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@ Coverage Diff @@ ## master #15 +/- ## ========================================= Coverage 82.32% 82.32% Complexity 1113 1113 ========================================= Files 91 91 Lines 4148 4148 Branches 554 554 ========================================= Hits 3415 3415 Misses 508 508 Partials 225 225 

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 24a95d8...526892c. Read the comment docs.

@neoremind neoremind merged commit 0f8076b into alibaba:master Dec 19, 2020
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.32%. Comparing base (24a95d8) to head (526892c).
⚠️ Report is 16 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@ ## master #15 +/- ## ========================================= Coverage 82.32% 82.32% Complexity 1113 1113 ========================================= Files 91 91 Lines 4148 4148 Branches 554 554 ========================================= Hits 3415 3415 Misses 508 508 Partials 225 225 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants