Skip to content

Commit

Permalink
Increase request timeout for refactorings to 30 seconds (#11278)
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Mäder <tmader@redhat.com>
  • Loading branch information
tsmaeder committed Sep 20, 2018
1 parent 48b1e35 commit ffe522c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Expand Up @@ -30,6 +30,7 @@
import static org.eclipse.che.ide.ext.java.shared.Constants.REFACTORING_GET_RENAME_TYPE;
import static org.eclipse.che.ide.ext.java.shared.Constants.REFACTORING_MOVE;
import static org.eclipse.che.ide.ext.java.shared.Constants.REFACTORING_RENAME;
import static org.eclipse.che.ide.ext.java.shared.Constants.REFACTORING_TIMEOUT;
import static org.eclipse.che.ide.ext.java.shared.Constants.REIMPORT_MAVEN_PROJECTS;
import static org.eclipse.che.ide.ext.java.shared.Constants.REIMPORT_MAVEN_PROJECTS_REQUEST_TIMEOUT;
import static org.eclipse.che.ide.ext.java.shared.Constants.REQUEST_TIMEOUT;
Expand Down Expand Up @@ -304,7 +305,7 @@ public Promise<RefactoringResult> rename(RenameSettings renameSettings) {
.endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID)
.methodName(REFACTORING_RENAME)
.paramsAsDto(renameSettings)
.sendAndReceiveResultAsDto(RefactoringResult.class, REQUEST_TIMEOUT)
.sendAndReceiveResultAsDto(RefactoringResult.class, REFACTORING_TIMEOUT)
.onSuccess(resolve::apply)
.onTimeout(() -> onTimeout(reject))
.onFailure(error -> reject.apply(ServiceUtil.getPromiseError(error))));
Expand Down Expand Up @@ -364,7 +365,7 @@ public Promise<RefactoringResult> move(MoveSettings moveSettings) {
.endpointId(WS_AGENT_JSON_RPC_ENDPOINT_ID)
.methodName(REFACTORING_MOVE)
.paramsAsDto(moveSettings)
.sendAndReceiveResultAsDto(RefactoringResult.class, REQUEST_TIMEOUT)
.sendAndReceiveResultAsDto(RefactoringResult.class, REFACTORING_TIMEOUT)
.onSuccess(resolve::apply)
.onTimeout(() -> onTimeout(reject))
.onFailure(error -> reject.apply(ServiceUtil.getPromiseError(error))));
Expand Down
Expand Up @@ -32,6 +32,7 @@ public final class Constants {

// LS requests timeout constants
public static final int REQUEST_TIMEOUT = 10_000;
public static final int REFACTORING_TIMEOUT = 30_000;
public static final int EFFECTIVE_POM_REQUEST_TIMEOUT = 30_000;
public static final int REIMPORT_MAVEN_PROJECTS_REQUEST_TIMEOUT = 60_000;

Expand Down

0 comments on commit ffe522c

Please sign in to comment.