Pochatkin commented on code in PR #7474:
URL: https://github.com/apache/ignite-3/pull/7474#discussion_r2741427928
##########
modules/rest/src/integrationTest/java/org/apache/ignite/internal/rest/deployment/DeploymentManagementControllerTest.java:
##########
@@ -144,15 +148,11 @@ public void cleanup() {
@Test
public void testDeploySuccessful() {
assertThat(deploy(UNIT_ID, VERSION), hasStatus(OK));
-
- awaitDeployedStatus(UNIT_ID, VERSION);
Review Comment:
Why do remove it?
##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/deployment/CompletedFileUploadSubscriber.java:
##########
@@ -76,18 +76,19 @@ public void onComplete() {
if (ex != null) {
result.completeExceptionally(ex);
} else {
- try {
- DeploymentUnit deploymentUnit = collector.toDeploymentUnit();
- result.complete(deploymentUnit);
- } catch (Exception e) {
- suppressException(e);
- try {
- collector.rollback();
- } catch (Exception e2) {
- suppressException(e2);
+ collector.toDeploymentUnit().whenComplete((deploymentUnit,
throwable) -> {
+ if (throwable != null) {
+ suppressException(throwable);
+ try {
+ collector.rollback();
+ } catch (Exception e2) {
+ suppressException(e2);
+ }
+ result.completeExceptionally(ex);
Review Comment:
Should be `throwable` here.
--
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]