Skip to content
This repository was archived by the owner on Sep 8, 2022. It is now read-only.

Add synchronization when sending events to sbt (fix ArrayIOBException). #78

Merged
merged 1 commit into from
Apr 10, 2017
Merged
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
18 changes: 10 additions & 8 deletions src/main/scala/scala/tools/partest/sbt/SBTRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,16 +64,18 @@ class SBTRunner(val config: RunnerSpec.Config,
javacCmdPath = Option(javacCmd).map(_.getAbsolutePath) getOrElse PartestDefaults.javacCmd,
scalacExtraArgs = scalacArgs,
javaOpts = javaOpts,
scalacOpts = scalacOpts) {
scalacOpts = scalacOpts) { self =>

override def onFinishTest(testFile: File, result: TestState): TestState = {
eventHandler.handle(new Event {
def fullyQualifiedName: String = testFile.testIdent
def fingerprint: Fingerprint = partestFingerprint
def selector: Selector = new TestSelector(testFile.testIdent)
val (status, throwable) = makeStatus(result)
def duration: Long = -1
})
self.synchronized {
eventHandler.handle(new Event {
def fullyQualifiedName: String = testFile.testIdent
def fingerprint: Fingerprint = partestFingerprint
def selector: Selector = new TestSelector(testFile.testIdent)
val (status, throwable) = makeStatus(result)
def duration: Long = -1
})
}
result
}
}
Expand Down