Permalink
Browse files

Made tests less verbose when running SBT locally (but not on Travis)

  • Loading branch information...
mpilquist committed Jan 3, 2018
1 parent 9816250 commit 5c2cd628f19d8c2ec9906745491dd8a944d462c0
Showing with 6 additions and 4 deletions.
  1. +1 −1 .travis.yml
  2. +2 −2 core/shared/src/test/scala/fs2/Fs2Spec.scala
  3. +3 −1 core/shared/src/test/scala/fs2/TestUtil.scala
View
@@ -23,7 +23,7 @@ env:
- PUBLISH=true
script:
- sbt ++$TRAVIS_SCALA_VERSION -Dfile.encoding=UTF8 test mimaReportBinaryIssues
- sbt ++$TRAVIS_SCALA_VERSION -Dfile.encoding=UTF8 -Dfs2.test.verbose test mimaReportBinaryIssues
- (test $TRAVIS_SCALA_VERSION == "2.11.11" && sbt ++$TRAVIS_SCALA_VERSION -Dfile.encoding=UTF8 -J-Xms2g -J-Xmx2g docs/tut) || test $TRAVIS_SCALA_VERSION == "2.12.4"
after_success:
@@ -30,8 +30,8 @@ trait Fs2SpecLike extends Suite
PropertyCheckConfiguration(minSuccessful = 25, workers = 1)
override def runTest(testName: String, args: Args): Status = {
println("Starting " + testName)
if (verbose) println("Starting " + testName)
try super.runTest(testName, args)
finally println("Finished " + testName)
finally if (verbose) println("Finished " + testName)
}
}
@@ -14,6 +14,8 @@ trait TestUtil extends TestUtilPlatform {
val timeout: FiniteDuration = 60.seconds
lazy val verbose: Boolean = sys.props.get("fs2.test.verbose").isDefined
def runLogF[A](s: Stream[IO,A]): Future[Vector[A]] = (IO.shift *> s.compile.toVector).unsafeToFuture
def spuriousFail(s: Stream[IO,Int], f: Failure): Stream[IO,Int] =
@@ -26,7 +28,7 @@ trait TestUtil extends TestUtilPlatform {
case e: InterruptedException => throw e
case e: TimeoutException => throw e
case Err => ()
case NonFatal(e) => e.printStackTrace; ()
case NonFatal(e) => ()
}
implicit def arbChunk[A](implicit A: Arbitrary[A]): Arbitrary[Chunk[A]] = Arbitrary(

0 comments on commit 5c2cd62

Please sign in to comment.