Skip to content

Commit

Permalink
Truncate excessively large log output in large collections
Browse files Browse the repository at this point in the history
  • Loading branch information
mdedetrich committed Sep 30, 2022
1 parent 19e16dc commit 81387f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ val scalaLoggingVersion = "3.9.5"
val logbackClassicVersion = "1.4.1"
val declineVersion = "2.3.0"
val pureConfigVersion = "0.17.1"
val scalaTestVersion = "3.2.13"
val scalaTestVersion = "3.2.14"
val scalaTestScalaCheckVersion = "3.2.12.0-RC2"
val akkaStreamsJson = "0.8.3"
val diffxVersion = "0.7.1"
val testContainersVersion = "0.40.10"
val testContainersJavaVersion = "1.17.3"
val scalaCheckVersion = "1.15.5-1-SNAPSHOT"
val scalaCheckOpsVersion = "2.8.1"
val scalaCheckOpsVersion = "2.9.0"
val enumeratumVersion = "1.7.0"
val organizeImportsVersion = "0.6.0"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import io.aiven.guardian.akka.AkkaHttpTestKit
import io.aiven.guardian.kafka.TestUtils
import io.aiven.guardian.kafka.models.ReducedConsumerRecord
import org.apache.kafka.clients.producer.ProducerRecord
import org.scalactic.Prettifier
import org.scalactic.SizeLimit
import org.scalatest.Ignore
import org.scalatest.Tag
import org.scalatest.concurrent.ScalaFutures
Expand Down Expand Up @@ -52,6 +54,11 @@ trait S3Spec
implicit override val generatorDrivenConfig: PropertyCheckConfiguration =
PropertyCheckConfiguration(minSuccessful = 1)

/** Due to the fact that we have to deal with massively generated collections when testing against S3, we override the
* default prettifier with one that truncates so we don't generate ridiculously large logs
*/
implicit val prettifier: Prettifier = Prettifier.truncateAt(SizeLimit(10))

val s3Settings: S3Settings

implicit lazy val s3Attrs: Attributes = S3Attributes.settings(s3Settings)
Expand Down

0 comments on commit 81387f0

Please sign in to comment.