From 13138457cf878bb162e1b49640825764bebe198b Mon Sep 17 00:00:00 2001 From: Ethan Atkins Date: Tue, 23 Jun 2020 20:23:19 -0700 Subject: [PATCH] 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. --- server-test/src/test/scala/testpkg/TestServer.scala | 1 + 1 file changed, 1 insertion(+) diff --git a/server-test/src/test/scala/testpkg/TestServer.scala b/server-test/src/test/scala/testpkg/TestServer.scala index bbaa74071..649923f47 100644 --- a/server-test/src/test/scala/testpkg/TestServer.scala +++ b/server-test/src/test/scala/testpkg/TestServer.scala @@ -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.")