Skip to content

Instantly share code, notes, and snippets.

@cacoco
Created February 4, 2023 04:22
Show Gist options
  • Save cacoco/32db7fc43768b58de1900aa1c163ce93 to your computer and use it in GitHub Desktop.
Save cacoco/32db7fc43768b58de1900aa1c163ce93 to your computer and use it in GitHub Desktop.
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