27 other 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.getFieldOrdinal(...), I've added annotations, PR: https://github.com/chrnndz3/innodb-java-reader/pull/1, to Employee class and Department class to retrieve the field ordinal using the field annotations instead of iterating through getDeclaredField() which is nondeterministic.
27 other 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.getFieldOrdinal(...), I've added annotations, PR: https://github.com/chrnndz3/innodb-java-reader/pull/1, to Employee class and Department class to retrieve the field ordinal using the field annotations instead of iterating through getDeclaredField() which is nondeterministic.
As per https://docs.oracle.com/javase/8/docs/api/java/lang/Class.html#getDeclaredFields--