Search in sources :

Example 16 with PLATFORM_TRANSACTION_NOT_CREATED

use of com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED in project hedera-services by hashgraph.

the class createTopicLoadTest method runCreateTopics.

private static HapiApiSpec runCreateTopics() {
    PerfTestLoadSettings settings = new PerfTestLoadSettings();
    final AtomicInteger submittedSoFar = new AtomicInteger(0);
    KeyShape submitKeyShape = threshOf(2, SIMPLE, SIMPLE, listOf(2));
    Supplier<HapiSpecOperation[]> submitBurst = () -> new HapiSpecOperation[] { createTopic("testTopic" + submittedSoFar.addAndGet(1)).submitKeyShape(submitKeyShape).noLogging().hasRetryPrecheckFrom(BUSY, DUPLICATE_TRANSACTION, PLATFORM_TRANSACTION_NOT_CREATED).deferStatusResolution() };
    return defaultHapiSpec("runCreateTopics").given(withOpContext((spec, ignore) -> settings.setFrom(spec.setup().ciPropertiesMap())), logIt(ignore -> settings.toString())).when().then(defaultLoadTest(submitBurst, settings));
}
Also used : LoadTest(com.hedera.services.bdd.spec.utilops.LoadTest) UtilVerbs.withOpContext(com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext) UtilVerbs.logIt(com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt) TxnVerbs.createTopic(com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) Supplier(java.util.function.Supplier) KeyShape.listOf(com.hedera.services.bdd.spec.keys.KeyShape.listOf) KeyShape.threshOf(com.hedera.services.bdd.spec.keys.KeyShape.threshOf) SIMPLE(com.hedera.services.bdd.spec.keys.KeyShape.SIMPLE) List(java.util.List) Logger(org.apache.logging.log4j.Logger) DUPLICATE_TRANSACTION(com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) BUSY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) PLATFORM_TRANSACTION_NOT_CREATED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) KeyShape(com.hedera.services.bdd.spec.keys.KeyShape) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation)

Aggregations

HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)16 HapiApiSpec.defaultHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec)16 HapiSpecOperation (com.hedera.services.bdd.spec.HapiSpecOperation)16 PLATFORM_TRANSACTION_NOT_CREATED (com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED)16 List (java.util.List)16 Supplier (java.util.function.Supplier)16 LogManager (org.apache.logging.log4j.LogManager)16 Logger (org.apache.logging.log4j.Logger)16 UtilVerbs.withOpContext (com.hedera.services.bdd.spec.utilops.UtilVerbs.withOpContext)15 PerfTestLoadSettings (com.hedera.services.bdd.suites.perf.PerfTestLoadSettings)15 BUSY (com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY)15 UtilVerbs.logIt (com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt)14 DUPLICATE_TRANSACTION (com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION)14 LoadTest (com.hedera.services.bdd.spec.utilops.LoadTest)12 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)12 OK (com.hederahashgraph.api.proto.java.ResponseCodeEnum.OK)10 TxnVerbs.cryptoCreate (com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate)9 TxnVerbs.cryptoTransfer (com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer)9 HapiCryptoTransfer.tinyBarsFromTo (com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo)7 SUCCESS (com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS)7