All Downloads are FREE. Search and download functionalities are using the official Maven repository.

mill.testkit.UtestIntegrationTestSuite.scala Maven / Gradle / Ivy

There is a newer version: 0.12.0-RC2-17-07e173
Show newest version
package mill.testkit
import mill.api.Retry

import scala.concurrent.duration.DurationInt
import scala.concurrent.{ExecutionContext, Future}

abstract class UtestIntegrationTestSuite extends utest.TestSuite with IntegrationTestSuite {
  protected def workspaceSourcePath: os.Path = os.Path(sys.env("MILL_TEST_RESOURCE_FOLDER"))
  protected def clientServerMode: Boolean = sys.env("MILL_INTEGRATION_SERVER_MODE").toBoolean
  protected def millExecutable: os.Path =
    os.Path(System.getenv("MILL_INTEGRATION_LAUNCHER"), os.pwd)

  override def utestWrap(path: Seq[String], runBody: => Future[Any])(implicit
      ec: ExecutionContext
  ): Future[Any] = {
    Retry(
      count = if (sys.env.contains("CI")) 1 else 0,
      timeoutMillis = 10.minutes.toMillis
    ) {
      super.utestWrap(path, runBody)
    }
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy