alievmirza commented on code in PR #2462:
URL: https://github.com/apache/ignite-3/pull/2462#discussion_r1299902491
##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/CatalogManagerValidationTest.java:
##########
@@ -157,24 +157,14 @@ void testValidateDataNodesAutoAdjustOnCreateZone() {
willThrowFast(CatalogValidationException.class, "Invalid data
nodes auto adjust")
);
- // Let's check the success cases.
- assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
0).dataNodesAutoAdjust(0).build()),
- willBe(nullValue())
- );
-
- assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
1).dataNodesAutoAdjust(Integer.MAX_VALUE).build()),
- willBe(nullValue())
- );
-
assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
2).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
- willBe(nullValue())
+ manager.createZone(createZoneBuilder(ZONE_NAME +
0).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
+ willThrowFast(CatalogValidationException.class, "Not
compatible parameters")
Review Comment:
I would prefer to save previous behaviour, and as far as I know, we already
have such logic, please check
`org.apache.ignite.internal.distributionzones.DistributionZoneManager#updateZoneChange`
##########
modules/catalog/src/test/java/org/apache/ignite/internal/catalog/CatalogManagerValidationTest.java:
##########
@@ -157,24 +157,14 @@ void testValidateDataNodesAutoAdjustOnCreateZone() {
willThrowFast(CatalogValidationException.class, "Invalid data
nodes auto adjust")
);
- // Let's check the success cases.
- assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
0).dataNodesAutoAdjust(0).build()),
- willBe(nullValue())
- );
-
- assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
1).dataNodesAutoAdjust(Integer.MAX_VALUE).build()),
- willBe(nullValue())
- );
-
assertThat(
- manager.createZone(createZoneBuilder(ZONE_NAME +
2).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
- willBe(nullValue())
+ manager.createZone(createZoneBuilder(ZONE_NAME +
0).dataNodesAutoAdjust(IMMEDIATE_TIMER_VALUE).build()),
+ willThrowFast(CatalogValidationException.class, "Not
compatible parameters")
Review Comment:
I would prefer to save the previous behaviour, and as far as I know, we
already have such logic, please check
`org.apache.ignite.internal.distributionzones.DistributionZoneManager#updateZoneChange`
--
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]