Make jmeter samplers depend on perftestcordapp rather than finance

This commit is contained in:
Christian Sailer 2017-11-23 12:03:17 +00:00
parent 2b217b6eea
commit c1c42c98e4
3 changed files with 14 additions and 3 deletions

View File

@ -17,15 +17,26 @@ import java.util.*
fun <T : Any> AMOUNT(amount: Int, token: T): Amount<T> = Amount.fromDecimal(BigDecimal.valueOf(amount.toLong()), token)
fun <T : Any> AMOUNT(amount: Double, token: T): Amount<T> = Amount.fromDecimal(BigDecimal.valueOf(amount), token)
fun <T : Any> AMOUNT(amount: Long, token: T): Amount<T> = Amount.fromDecimal(BigDecimal.valueOf(amount), token)
fun DOLLARS(amount: Int): Amount<Currency> = AMOUNT(amount, USD)
fun DOLLARS(amount: Double): Amount<Currency> = AMOUNT(amount, USD)
fun DOLLARS(amount: Long): Amount<Currency> = AMOUNT(amount, USD)
fun POUNDS(amount: Int): Amount<Currency> = AMOUNT(amount, GBP)
fun POUNDS(amount: Double): Amount<Currency> = AMOUNT(amount, GBP)
fun POUNDS(amount: Long): Amount<Currency> = AMOUNT(amount, GBP)
fun SWISS_FRANCS(amount: Int): Amount<Currency> = AMOUNT(amount, CHF)
fun SWISS_FRANCS(amount: Double): Amount<Currency> = AMOUNT(amount, CHF)
fun SWISS_FRANCS(amount: Long): Amount<Currency> = AMOUNT(amount, CHF)
val Int.DOLLARS: Amount<Currency> get() = DOLLARS(this)
val Double.DOLLARS: Amount<Currency> get() = DOLLARS(this)
val Long.DOLLARS: Amount<Currency> get() = DOLLARS(this)
val Int.POUNDS: Amount<Currency> get() = POUNDS(this)
val Double.POUNDS: Amount<Currency> get() = POUNDS(this)
val Long.POUNDS: Amount<Currency> get() = POUNDS(this)
val Int.SWISS_FRANCS: Amount<Currency> get() = SWISS_FRANCS(this)
val Double.SWISS_FRANCS: Amount<Currency> get() = SWISS_FRANCS(this)
val Long.SWISS_FRANCS: Amount<Currency> get() = SWISS_FRANCS(this)
infix fun Currency.`issued by`(deposit: PartyAndReference) = issuedBy(deposit)
infix fun Amount<Currency>.`issued by`(deposit: PartyAndReference) = issuedBy(deposit)

View File

@ -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'

View File

@ -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