When users don't specify an orderer, we should honor the @Order
annotations. We also would need a test for this.
Best done after #34681 to avoid merge woes.
(Also a bit relevant to #42715.)
We currently use the ClassName class orderer:
return Optional.ofNullable(getConfigParam(CFGKEY_SECONDARY_ORDERER, null, context))
.map(fqcn -> {
try {
return (ClassOrderer) Class.forName(fqcn)
.getDeclaredConstructor()
.newInstance();
} catch (ReflectiveOperationException e) {
throw new IllegalArgumentException("Failed to instantiate " + fqcn, e);
}
})
.orElseGet(ClassOrderer.ClassName::new);
... but it should probably use the org.junit.jupiter.api.ClassOrderer$OrderAnnotation
by default.