From c1c42c98e4ac8041a61a48ba3c881c1994dfcd40 Mon Sep 17 00:00:00 2001 From: Christian Sailer Date: Thu, 23 Nov 2017 12:03:17 +0000 Subject: [PATCH] Make jmeter samplers depend on perftestcordapp rather than finance --- .../r3/corda/enterprise/perftestcordapp/Currencies.kt | 11 +++++++++++ tools/jmeter/build.gradle | 2 +- .../src/main/kotlin/com/r3/corda/jmeter/Samplers.kt | 4 ++-- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/perftestcordapp/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/Currencies.kt b/perftestcordapp/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/Currencies.kt index 29c8d1a5ed..ceaf4e87ab 100644 --- a/perftestcordapp/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/Currencies.kt +++ b/perftestcordapp/src/main/kotlin/com/r3/corda/enterprise/perftestcordapp/Currencies.kt @@ -17,15 +17,26 @@ import java.util.* fun AMOUNT(amount: Int, token: T): Amount = Amount.fromDecimal(BigDecimal.valueOf(amount.toLong()), token) fun AMOUNT(amount: Double, token: T): Amount = Amount.fromDecimal(BigDecimal.valueOf(amount), token) +fun AMOUNT(amount: Long, token: T): Amount = Amount.fromDecimal(BigDecimal.valueOf(amount), token) fun DOLLARS(amount: Int): Amount = AMOUNT(amount, USD) fun DOLLARS(amount: Double): Amount = AMOUNT(amount, USD) +fun DOLLARS(amount: Long): Amount = AMOUNT(amount, USD) fun POUNDS(amount: Int): Amount = AMOUNT(amount, GBP) +fun POUNDS(amount: Double): Amount = AMOUNT(amount, GBP) +fun POUNDS(amount: Long): Amount = AMOUNT(amount, GBP) fun SWISS_FRANCS(amount: Int): Amount = AMOUNT(amount, CHF) +fun SWISS_FRANCS(amount: Double): Amount = AMOUNT(amount, CHF) +fun SWISS_FRANCS(amount: Long): Amount = AMOUNT(amount, CHF) val Int.DOLLARS: Amount get() = DOLLARS(this) val Double.DOLLARS: Amount get() = DOLLARS(this) +val Long.DOLLARS: Amount get() = DOLLARS(this) val Int.POUNDS: Amount get() = POUNDS(this) +val Double.POUNDS: Amount get() = POUNDS(this) +val Long.POUNDS: Amount get() = POUNDS(this) val Int.SWISS_FRANCS: Amount get() = SWISS_FRANCS(this) +val Double.SWISS_FRANCS: Amount get() = SWISS_FRANCS(this) +val Long.SWISS_FRANCS: Amount get() = SWISS_FRANCS(this) infix fun Currency.`issued by`(deposit: PartyAndReference) = issuedBy(deposit) infix fun Amount.`issued by`(deposit: PartyAndReference) = issuedBy(deposit) diff --git a/tools/jmeter/build.gradle b/tools/jmeter/build.gradle index aa041346fc..f6dbb86b94 100644 --- a/tools/jmeter/build.gradle +++ b/tools/jmeter/build.gradle @@ -6,7 +6,7 @@ mainClassName = 'com.r3.corda.jmeter.Launcher' dependencies { compile project(':client:rpc') - compile project(':finance') + compile project(':perftestcordapp') // https://mvnrepository.com/artifact/com.jcraft/jsch compile group: 'com.jcraft', name: 'jsch', version: '0.1.54' diff --git a/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Samplers.kt b/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Samplers.kt index e23cc399cc..3af2e1d0f6 100644 --- a/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Samplers.kt +++ b/tools/jmeter/src/main/kotlin/com/r3/corda/jmeter/Samplers.kt @@ -1,11 +1,11 @@ package com.r3.corda.jmeter +import com.r3.corda.enterprise.perftestcordapp.DOLLARS +import com.r3.corda.enterprise.perftestcordapp.flows.CashIssueFlow import net.corda.core.identity.CordaX500Name import net.corda.core.identity.Party import net.corda.core.messaging.CordaRPCOps import net.corda.core.utilities.OpaqueBytes -import net.corda.finance.DOLLARS -import net.corda.finance.flows.CashIssueFlow import org.apache.jmeter.config.Argument import org.apache.jmeter.protocol.java.sampler.JavaSamplerContext