Skip to content

Commit

Permalink
Trigger thread dump if CharsetRangeSpec deadlocks
Browse files Browse the repository at this point in the history
In several of the recent Travis CI build build failures:

 * [3444.6](https://travis-ci.org/http4s/http4s/jobs/193191028)
 * [3458.6](https://travis-ci.org/http4s/http4s/jobs/193838431)
 * [3534.6](https://travis-ci.org/http4s/http4s/jobs/195974285)

the test that did not complete was `CharsetRangeSpec`.  Mix in
`ThreadDumpOnTimeout` and set a 2 second timeout to help identify
the source of the deadlock causing http4s#774.
  • Loading branch information
bfritz committed Jan 28, 2017
1 parent 9896907 commit 4d818e2
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions tests/src/test/scala/org/http4s/CharsetRangeSpec.scala
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
package org.http4s

import scalaz.scalacheck.ScalazProperties

import org.http4s.CharsetRange.`*`
import org.scalacheck.{Gen, Prop}
import org.scalacheck.Prop.forAll
import org.http4s.testing.ThreadDumpOnTimeout
import org.scalacheck.Arbitrary._
import org.specs2.ScalaCheck
import org.specs2.mutable.Specification

import scala.concurrent.duration._
import scalaz.scalacheck.ScalazProperties
import scalaz.syntax.order._

class CharsetRangeSpec extends Http4sSpec {
class CharsetRangeSpec extends Http4sSpec with ThreadDumpOnTimeout {

override def triggerThreadDumpAfter = 2.seconds

"*" should {
"be satisfied by any charset when q > 0" in {
prop { (range: CharsetRange.`*`, cs: Charset) =>
Expand Down

0 comments on commit 4d818e2

Please sign in to comment.