diff --git a/tests/slow/src/test/scala/tests/mill/MillBreakpointDapSuite.scala b/tests/slow/src/test/scala/tests/mill/MillBreakpointDapSuite.scala index 490647c7a4c..597cd7d0dc2 100644 --- a/tests/slow/src/test/scala/tests/mill/MillBreakpointDapSuite.scala +++ b/tests/slow/src/test/scala/tests/mill/MillBreakpointDapSuite.scala @@ -13,6 +13,9 @@ class MillBreakpointDapSuite MillBuildLayout, ) { + // mill sometimes hangs and doesn't return main classes + override protected val retryTimes: Int = 2 + override def serverConfig: MetalsServerConfig = - super.serverConfig.copy(debugServerStartTimeout = 360) + super.serverConfig.copy(debugServerStartTimeout = 120) } diff --git a/tests/slow/src/test/scala/tests/mill/MillDebugDiscoverySuite.scala b/tests/slow/src/test/scala/tests/mill/MillDebugDiscoverySuite.scala index e2a4463eb70..f5ab79c7e80 100644 --- a/tests/slow/src/test/scala/tests/mill/MillDebugDiscoverySuite.scala +++ b/tests/slow/src/test/scala/tests/mill/MillDebugDiscoverySuite.scala @@ -26,6 +26,9 @@ class MillDebugDiscoverySuite private val fooPath = "a/test/src/Foo.scala" private val barPath = "a/test/src/Bar.scala" + // mill sometimes hangs and doesn't return main classes + override protected val retryTimes: Int = 2 + for (scala <- List(scalaVersion, scala3)) { test(s"testTarget-$scala") { diff --git a/tests/slow/src/test/scala/tests/mill/MillStepDapSuite.scala b/tests/slow/src/test/scala/tests/mill/MillStepDapSuite.scala index c78bcd6df84..9b1509bbce9 100644 --- a/tests/slow/src/test/scala/tests/mill/MillStepDapSuite.scala +++ b/tests/slow/src/test/scala/tests/mill/MillStepDapSuite.scala @@ -14,6 +14,9 @@ class MillStepDapSuite MillBuildLayout, ) { + // mill sometimes hangs and doesn't return main classes + override protected val retryTimes: Int = 2 + // otherwise we get both Scala 2.12 and 2.13 dependencies, which is more tricky for the tests override def scalaVersion: String = BuildInfo.scala212 diff --git a/tests/unit/src/main/scala/tests/BaseDapSuite.scala b/tests/unit/src/main/scala/tests/BaseDapSuite.scala index 5a30bf2bd02..2926cb6002c 100644 --- a/tests/unit/src/main/scala/tests/BaseDapSuite.scala +++ b/tests/unit/src/main/scala/tests/BaseDapSuite.scala @@ -26,6 +26,8 @@ abstract class BaseDapSuite( override def serverConfig: MetalsServerConfig = super.serverConfig.copy(loglevel = "debug") + protected val retryTimes = 0 + override def beforeEach(context: BeforeEach): Unit = { super.beforeEach(context) dapClient.touch() @@ -102,7 +104,7 @@ abstract class BaseDapSuite( )( source: String )(implicit loc: Location): Unit = { - test(name) { + test(name, maxRetry = retryTimes) { cleanWorkspace() val debugLayout = DebugWorkspaceLayout(source, workspace) val workspaceLayout = buildToolLayout(debugLayout.toString, scalaVersion)