lowka commented on code in PR #6305: URL: https://github.com/apache/ignite-3/pull/6305#discussion_r2228247460
########## modules/runner/src/test/java/org/apache/ignite/internal/configuration/compatibility/framework/ConfigurationTreeComparatorSelfTest.java: ########## @@ -491,12 +635,17 @@ private static void assertIncompatible(List<ConfigNode> oldConfig, List<ConfigNo private static void assertIncompatible(List<ConfigNode> oldConfig, List<ConfigNode> newConfig, ComparisonContext compContext) { try { - assertCompatible(oldConfig, newConfig, compContext); - } catch (IllegalStateException ignore) { + ConfigurationTreeComparator.ensureCompatible(oldConfig, newConfig, compContext); + } catch (IllegalStateException e) { // Expected exception + System.err.println("Error: " + e.getMessage()); return; } fail("Compatibility check passed unexpectedly."); } + + private static Set<Flags> createFlags(boolean hasDefault) { + return hasDefault ? Set.of(Flags.HAS_DEFAULT, Flags.IS_VALUE) : Set.of(Flags.IS_VALUE); Review Comment: > some upper code can be simplified This is questionable as an empty EnumSet requires additional parameters. There is no additional benefits of using it here when a simple immutable set does the job. ########## modules/runner/src/test/java/org/apache/ignite/internal/configuration/compatibility/framework/ConfigurationTreeComparatorSelfTest.java: ########## @@ -491,12 +635,17 @@ private static void assertIncompatible(List<ConfigNode> oldConfig, List<ConfigNo private static void assertIncompatible(List<ConfigNode> oldConfig, List<ConfigNode> newConfig, ComparisonContext compContext) { try { - assertCompatible(oldConfig, newConfig, compContext); - } catch (IllegalStateException ignore) { + ConfigurationTreeComparator.ensureCompatible(oldConfig, newConfig, compContext); + } catch (IllegalStateException e) { // Expected exception + System.err.println("Error: " + e.getMessage()); return; } fail("Compatibility check passed unexpectedly."); } + + private static Set<Flags> createFlags(boolean hasDefault) { + return hasDefault ? Set.of(Flags.HAS_DEFAULT, Flags.IS_VALUE) : Set.of(Flags.IS_VALUE); Review Comment: > some upper code can be simplified This is questionable as an empty EnumSet requires additional parameters. There is no additional benefits of using it here when a simple immutable set does the job. -- 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: notifications-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org