Don't spam the portfile during TestServer startup

Prior to this change, the server test was repeatedly performing io on
the portfile while the server was starting up. This adds a modest sleep
so that the test is just as responsive without doing needless io.
This commit is contained in:
Ethan Atkins 2020-06-23 20:23:19 -07:00
parent cebf740931
commit 13138457cf
1 changed files with 1 additions and 0 deletions

View File

@ -187,6 +187,7 @@ case class TestServer(
hostLog("waiting for the server...")
nextLog = 10.seconds.fromNow
}
Thread.sleep(10) // Don't spam the portfile
}
if (deadline.isOverdue) sys.error(s"Timeout. $portfile is not found.")
if (!process.isAlive) sys.error(s"Server unexpectedly terminated.")