sanpwc commented on code in PR #2059:
URL: https://github.com/apache/ignite-3/pull/2059#discussion_r1191127924
##########
modules/distribution-zones/src/test/java/org/apache/ignite/internal/distributionzones/DistributionZoneAwaitDataNodesTest.java:
##########
@@ -342,20 +351,21 @@ void testWithOutAwaiting() throws Exception {
/**
* Test checks that data nodes futures are completed exceptionally if the
zone was removed while data nodes awaiting.
*/
- @Disabled("https://issues.apache.org/jira/browse/IGNITE-19255")
@Test
void testRemoveZoneWhileAwaitingDataNodes() throws Exception {
startZoneManager();
+ String zoneName = "zone0";
+
distributionZoneManager.createZone(
- new
DistributionZoneConfigurationParameters.Builder("zone0")
+ new
DistributionZoneConfigurationParameters.Builder(zoneName)
.dataNodesAutoAdjustScaleUp(IMMEDIATE_TIMER_VALUE)
.dataNodesAutoAdjustScaleDown(IMMEDIATE_TIMER_VALUE)
.build()
)
.get(3, SECONDS);
- int zoneId = distributionZoneManager.getZoneId("zone0");
+ int zoneId = distributionZoneManager.getZoneId(zoneName);
Review Comment:
Seems that we don't need explicit zoneId retrieval, because
distributionZoneManager.createZone() will return future with zoneId. Meaning
that it's enough to write following.
```
Integer zoneId = distributionZoneManager.createZone(
new
DistributionZoneConfigurationParameters.Builder("zone0")
new
DistributionZoneConfigurationParameters.Builder(zoneName)
.dataNodesAutoAdjustScaleUp(IMMEDIATE_TIMER_VALUE)
.dataNodesAutoAdjustScaleDown(IMMEDIATE_TIMER_VALUE)
.build()
)
.get(3, SECONDS);
```
And btw, let's update createZone javadoc in a way that it will explicitly
denote that CompletableFuture<Integer> is a future with zoneId.
--
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]