Trader Demo test now works again.

This commit is contained in:
Clinton Alexander 2016-06-09 10:31:42 +01:00 committed by Andras Slemmer
parent 10fa86002d
commit 560989a914

View File

@ -4,6 +4,7 @@ import com.r3corda.demos.DemoConfig
import com.r3corda.demos.runTraderDemo
import org.junit.Test
import java.nio.file.Paths
import kotlin.concurrent.thread
import kotlin.test.assertEquals
class TraderDemoTest {
@ -19,7 +20,14 @@ class TraderDemoTest {
private fun runBuyer() {
val config = DemoConfig(true)
runTraderDemo(arrayOf("--role", "BUYER"), config)
thread(true, false, null, "Buyer", -1, {
try {
runTraderDemo(arrayOf("--role", "BUYER"), config)
} finally {
// Will only reach here during error or after node is stopped, so ensure lock is unlocked.
config.nodeReady.countDown()
}
})
config.nodeReady.await()
}