wombatu-kun commented on code in PR #20348:
URL: https://github.com/apache/hudi/pull/20348#discussion_r4305381927
##########
hudi-client/hudi-client-common/src/test/java/org/apache/hudi/table/upgrade/TestNineToEightDowngradeHandler.java:
##########
@@ -251,6 +253,42 @@ void testDowngradeForOtherPayloadClass() {
}
}
+ @Test
+ void testDowngradeRefusesSeveralOrderingFields() {
+ try (MockedStatic<UpgradeDowngradeUtils> utilities =
Mockito.mockStatic(UpgradeDowngradeUtils.class)) {
+ when(tableConfig.getOrderingFieldsStr()).thenReturn(Option.of("ts,seq"));
+ HoodieUpgradeDowngradeException exception =
assertThrows(HoodieUpgradeDowngradeException.class,
+ () -> handler.downgrade(config, context, "anyInstant",
upgradeDowngradeHelper));
+ assertEquals("Cannot downgrade to table version 8:
hoodie.table.ordering.fields=ts,seq orders records on several fields, "
Review Comment:
Done aef75ce3c4e9. No test asserts the whole message now: this test went
away with the handler check, and `TestUpgradeDowngrade` matches the same
leading part as the orchestration test, target version included.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]