dimas-b commented on code in PR #2890:
URL: https://github.com/apache/polaris/pull/2890#discussion_r2461058794


##########
persistence/nosql/idgen/impl/build.gradle.kts:
##########
@@ -85,4 +89,23 @@ tasks.named("jcstress") {
   inputs.files(jcstressRuntime)
   inputs.files(configurations.runtimeClasspath)
   outputs.dir(layout.buildDirectory.dir("reports/jcstress"))
+
+  // Capture jcstress output in a log file, dump that in case of a failure.
+
+  val logDir = 
project.layout.buildDirectory.dir("reports/jcstress").get().asFile
+  val logFile = File(logDir, "jcstress.log")
+  var logStream: FileOutputStream? = null
+
+  actions.addFirst {
+    logStream = FileOutputStream(logFile)
+    standardOutput = logStream
+    errorOutput = logStream
+  }
+
+  actions.addLast {
+    logStream?.close()
+    if (state.failure != null) {

Review Comment:
   nit: maybe add a `-D` option to enable it in normal runs (for local poking)?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to