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

Truncate excessively large log output in large collections #265

Merged
merged 1 commit into from
Sep 30, 2022
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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