Created
February 4, 2023 04:22
-
-
Save cacoco/32db7fc43768b58de1900aa1c163ce93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import com.twitter.finagle.Http | |
import com.twitter.inject.server.{EmbeddedTwitterServer, FeatureTest} | |
import java.net.InetAddress | |
class MyTwitterServerFeatureTest extends FeatureTest { | |
override protected val server = | |
new EmbeddedTwitterServer(new MyTwitterServer) | |
lazy val client = | |
Http.client | |
.withSessionQualifier.noFailFast | |
.withSessionQualifier.noFailureAccrual | |
.newService( | |
s"${InetAddress | |
.getLoopbackAddress | |
.getHostAddress | |
}:${server.httpAdminPort}") | |
override protected def beforeAll(): Unit = { | |
server.start() | |
} | |
test("MyTwitterServer#starts") { | |
server.isHealthy | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment