Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
lolgab committed Jan 13, 2025
1 parent b44373e commit d10922e
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import mill._
import mill.scalalib._
import mill.testkit.{TestBaseModule, UnitTester}
import utest._
import java.util.concurrent.atomic.AtomicBoolean

object SNUnitMillPluginTests extends TestSuite {
def tests: Tests = Tests {
Expand All @@ -17,9 +18,13 @@ object SNUnitMillPluginTests extends TestSuite {
val resourceFolder = os.Path(sys.env("MILL_TEST_RESOURCE_DIR").split(";").head)

UnitTester(build, resourceFolder / "simple").scoped { eval =>
scala.concurrent.ExecutionContext.global.execute(() => eval(build.snunitRunNGINXUnit()))
val ended = new AtomicBoolean(false)
scala.concurrent.ExecutionContext.global.execute { () =>
eval(build.snunitRunNGINXUnit())
ended.set(true)
}
var started = false
while (!started) {
while (!started && !ended.get()) {
try {
val response = requests.get("http://127.0.0.1:8080", check = false).text()
started = true
Expand Down

0 comments on commit d10922e

Please sign in to comment.