Skip to content

Commit

Permalink
write unique test results file name
Browse files Browse the repository at this point in the history
  • Loading branch information
scottsand-db committed Sep 19, 2024
1 parent 01b1439 commit ec6e7a3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions project/TestTimeListener.scala
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ object TestTimeListener extends TestReportListener {
private val testResults = new ConcurrentHashMap[String, Seq[(String, Long, String)]]()

/** Generate a unique file name per JVM using process ID and timestamp */
private val jvmId: String = ManagementFactory.getRuntimeMXBean().getName.split("@")(0)
private val individualTestCsvPath = s"test_results_jvm_${jvmId}.csv"
private val jvmId = ManagementFactory.getRuntimeMXBean().getName.split("@")(0)
private val individualTestCsvPath = s"test_results_${jvmId}_${System.currentTimeMillis()}.csv"

/** Lock to ensure only one thread writes to a file at a time within this JVM */
private val writeLock = new ReentrantLock()
Expand Down

0 comments on commit ec6e7a3

Please sign in to comment.