Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix jmh Microbenchmarks #8990

Merged
merged 3 commits into from
Mar 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,9 @@ lazy val PlayMicrobenchmarkProject = PlayCrossBuiltProject("Play-Microbenchmark"
PlaySpecs2Project,
PlayFiltersHelpersProject,
PlayJavaProject,
PlayNettyServerProject
PlayNettyServerProject,
PlayAkkaHttpServerProject,
PlayAkkaHttp2SupportProject
)

lazy val PlayCacheProject = PlayCrossBuiltProject("Play-Cache", "cache/play-cache")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import okhttp3.OkHttpClient
import okhttp3.Protocol
import okhttp3.Request
import okhttp3.Response
import javax.net.ssl.SSLSession
import org.openjdk.jmh.annotations._
import play.api.mvc.Results
import play.api.test.ApplicationFactory
Expand Down Expand Up @@ -117,6 +118,7 @@ object HelloWorldBenchmark {
val b2 = bench.serverEndpoint.ssl match {
case Some(ssl) =>
b1.sslSocketFactory(ssl.sslContext.getSocketFactory, ssl.trustManager)
.hostnameVerifier((s: String, sslSession: SSLSession) => true)
case _ => b1
}
b2.build()
Expand Down
3 changes: 2 additions & 1 deletion scripts/validate-microbenchmarks
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ printMessage "VALIDATING MICROBENCHMARKS"
# We are using double-double quotes here so that the command
# is passed to runSbt as a single command and internally be
# passed to sbt as a single command too.
runSbt "Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1"
# foe = FailOnError http://mail.openjdk.java.net/pipermail/jmh-dev/2015-February/001685.html
runSbt "Play-Microbenchmark/jmh:run -i 1 -wi 0 -f 1 -t 1 -foe=true"

printMessage "BENCHMARKS VALIDATED"