From 0f2a1aa4b2773d09d9a01bf52c0fa08be0597c99 Mon Sep 17 00:00:00 2001 From: Tomasz Godzik Date: Fri, 29 Sep 2023 16:39:46 +0200 Subject: [PATCH] bugfix: Wait longer to connect to build tools other than Bloop This seems to happen consistently in our Scala CLI tests, since it first needs to resolve a bunch of things. --- .../meta/internal/metals/BuildServerConnection.scala | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala b/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala index 5ebb19e6c76..5bb0efb3263 100644 --- a/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala +++ b/metals/src/main/scala/scala/meta/internal/metals/BuildServerConnection.scala @@ -576,13 +576,13 @@ object BuildServerConnection { params.setData(data) params } - // Block on the `build/initialize` request because it should respond instantly - // and we want to fail fast if the connection is not + // Block on the `build/initialize` request because it should respond instantly by Bloop + // and we want to fail fast if the connection is not made val result = - if (serverName == SbtBuildTool.name) { - initializeResult.get(60, TimeUnit.SECONDS) - } else { + if (serverName == BloopServers.name) { initializeResult.get(20, TimeUnit.SECONDS) + } else { + initializeResult.get(60, TimeUnit.SECONDS) } server.onBuildInitialized()