From ced4a272408cfc13b45da20da3607e2dd7e07389 Mon Sep 17 00:00:00 2001 From: Robert Autenrieth <31539813+rautenrieth-da@users.noreply.github.com> Date: Wed, 22 Sep 2021 21:11:26 +0200 Subject: [PATCH] Include concurrency info in output (#10970) changelog_begin changelog_end --- .../daml/ledger/api/testtool/LedgerApiTestTool.scala | 10 +++++++++- .../ledger/api/testtool/infrastructure/Reporter.scala | 6 +++--- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/LedgerApiTestTool.scala b/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/LedgerApiTestTool.scala index 35ea102a0050..4b3b8b1dc4c4 100644 --- a/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/LedgerApiTestTool.scala +++ b/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/LedgerApiTestTool.scala @@ -191,7 +191,15 @@ object LedgerApiTestTool { new ColorizedPrintStreamReporter( System.out, config.verbose, - ).report(summaries, excludedTestSummaries, identifierSuffix) + ).report( + summaries, + excludedTestSummaries, + Seq( + "identifierSuffix" -> identifierSuffix, + "concurrentTestRuns" -> config.concurrentTestRuns.toString, + "timeoutScaleFactor" -> config.timeoutScaleFactor.toString, + ), + ) sys.exit(exitCode(summaries, config.mustFail)) case Failure(exception: Errors.FrameworkException) => logger.error(exception.getMessage) diff --git a/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Reporter.scala b/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Reporter.scala index e52a857d10c9..11bf33525359 100644 --- a/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Reporter.scala +++ b/ledger/ledger-api-test-tool/src/main/scala/com/daml/ledger/api/testtool/infrastructure/Reporter.scala @@ -13,7 +13,7 @@ trait Reporter[A] { def report( results: Vector[LedgerTestSummary], skippedTests: Vector[LedgerTestSummary], - identifierSuffix: String, + runInfo: Seq[(String, String)], ): A } @@ -112,7 +112,7 @@ object Reporter { override def report( results: Vector[LedgerTestSummary], excludedTests: Vector[LedgerTestSummary], - identifierSuffix: String, + runInfo: Seq[(String, String)], ): Unit = { s.println() s.println(blue("#" * 80)) @@ -124,7 +124,7 @@ object Reporter { s.println() s.println(yellow("### RUN INFORMATION")) s.println() - s.println(cyan(s"identifierSuffix = $identifierSuffix")) + runInfo.foreach { case (label, value) => s.println(cyan(s"$label = $value")) } val (successes, failures) = results.partition(_.result.isRight)