@@ -15,15 +15,16 @@ import org.scalatest.funsuite.AnyFunSuite
1515import scala .concurrent .duration .FiniteDuration
1616
1717abstract class RestApiTest extends AnyFunSuite with ScalaFutures {
18-
1918 protected final val MaxConnections : Int = 1 // to timeout quickly
2019 protected final val Connections : Int = 10 // > MaxConnections
2120 protected final val CallTimeout : FiniteDuration = 300 .millis // << idle timeout
2221
2322 implicit def scheduler : Scheduler = Scheduler .global
2423
24+ private val impl : RestTestApi = RestTestApi .Impl
25+
2526 final val serverHandle : RawRest .HandleRequest =
26- RawRest .asHandleRequest[RestTestApi ](RestTestApi . Impl )
27+ RawRest .asHandleRequest[RestTestApi ](impl )
2728
2829 def clientHandle : RawRest .HandleRequest
2930
@@ -33,16 +34,16 @@ abstract class RestApiTest extends AnyFunSuite with ScalaFutures {
3334 def testCall [T ](call : RestTestApi => Future [T ])(implicit pos : Position ): Unit =
3435 assert(
3536 call(proxy).wrapToTry.futureValue.map(mkDeep) ==
36- call(RestTestApi . Impl ).catchFailures.wrapToTry.futureValue.map(mkDeep)
37+ call(impl ).catchFailures.wrapToTry.futureValue.map(mkDeep)
3738 )
3839
3940 def mkDeep (value : Any ): Any = value match {
4041 case arr : Array [_] => IArraySeq .empty[AnyRef ] ++ arr.iterator.map(mkDeep)
4142 case _ => value
4243 }
4344
44- def getNeverGetCounter (): Int = RestTestApi . Impl .neverGetCounter.get()
45- def resetNeverGetCounter (): Unit = RestTestApi . Impl .neverGetCounter.set(0 )
45+ def getNeverGetCounter (): Int = impl .neverGetCounter.get()
46+ def resetNeverGetCounter (): Unit = impl .neverGetCounter.set(0 )
4647}
4748
4849trait RestApiTestScenarios extends RestApiTest {
0 commit comments