Search in sources :

Example 1 with DEFAULT_MINS_FOR_RECONNECT_TESTS

use of com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS in project hedera-services by hashgraph.

the class CreateFilesBeforeReconnect method runCreateFiles.

private HapiApiSpec runCreateFiles() {
    PerfTestLoadSettings settings = new PerfTestLoadSettings(FILE_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS);
    Supplier<HapiSpecOperation[]> createBurst = () -> new HapiSpecOperation[] { generateFileCreateOperation() };
    return defaultHapiSpec("RunCreateFiles").given(logIt(ignore -> settings.toString())).when().then(defaultLoadTest(createBurst, settings));
}
Also used : UtilVerbs.logIt(com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) Supplier(java.util.function.Supplier) DEFAULT_THREADS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_THREADS_FOR_RECONNECT_TESTS) LoadTest.defaultLoadTest(com.hedera.services.bdd.spec.utilops.LoadTest.defaultLoadTest) UtilVerbs.noOp(com.hedera.services.bdd.spec.utilops.UtilVerbs.noOp) List(java.util.List) TxnVerbs.fileCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileCreate) Logger(org.apache.logging.log4j.Logger) DUPLICATE_TRANSACTION(com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DEFAULT_MINS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) 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) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation)

Example 2 with DEFAULT_MINS_FOR_RECONNECT_TESTS

use of com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS in project hedera-services by hashgraph.

the class CreateSchedulesBeforeReconnect method runCreateSchedules.

private HapiApiSpec runCreateSchedules() {
    PerfTestLoadSettings settings = new PerfTestLoadSettings(SCHEDULE_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS);
    Supplier<HapiSpecOperation[]> createBurst = () -> new HapiSpecOperation[] { generateScheduleCreateOperation() };
    return defaultHapiSpec("RunCreateSchedules").given(scheduleOpsEnablement(), logIt(ignore -> settings.toString()), cryptoCreate("scheduleSender").balance(initialBalance.getAsLong()).key(GENESIS).hasRetryPrecheckFrom(BUSY, DUPLICATE_TRANSACTION, PLATFORM_TRANSACTION_NOT_CREATED).deferStatusResolution(), cryptoCreate("scheduleReceiver").key(GENESIS).hasRetryPrecheckFrom(BUSY, DUPLICATE_TRANSACTION, PLATFORM_TRANSACTION_NOT_CREATED).deferStatusResolution(), sleepFor(10000), scheduleCreate("schedule-" + getHostName() + "-" + scheduleNumber.getAndIncrement(), cryptoTransfer(tinyBarsFromTo("scheduleSender", "scheduleReceiver", 1))).signedBy(DEFAULT_PAYER).fee(ONE_HUNDRED_HBARS).alsoSigningWith("scheduleSender").hasPrecheckFrom(STANDARD_PERMISSIBLE_PRECHECKS).hasAnyKnownStatus().deferStatusResolution().adminKey(DEFAULT_PAYER).noLogging().advertisingCreation()).when(fileUpdate(APP_PROPERTIES).payingWith(GENESIS).overridingProps(Map.of("ledger.schedule.txExpiryTimeSecs", "" + 60)), sleepFor(10000)).then(scheduleCreate("schedule-" + getHostName() + "-" + scheduleNumber.getAndIncrement(), cryptoTransfer(tinyBarsFromTo("scheduleSender", "scheduleReceiver", 1))).signedBy(DEFAULT_PAYER).fee(ONE_HUNDRED_HBARS).alsoSigningWith("scheduleSender").hasPrecheckFrom(STANDARD_PERMISSIBLE_PRECHECKS).hasAnyKnownStatus().deferStatusResolution().adminKey(DEFAULT_PAYER).noLogging().advertisingCreation(), defaultLoadTest(createBurst, settings));
}
Also used : TxnVerbs.cryptoCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoCreate) TxnVerbs.cryptoTransfer(com.hedera.services.bdd.spec.transactions.TxnVerbs.cryptoTransfer) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) TxnVerbs.fileUpdate(com.hedera.services.bdd.spec.transactions.TxnVerbs.fileUpdate) Supplier(java.util.function.Supplier) DEFAULT_THREADS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_THREADS_FOR_RECONNECT_TESTS) LoadTest.defaultLoadTest(com.hedera.services.bdd.spec.utilops.LoadTest.defaultLoadTest) UtilVerbs.sleepFor(com.hedera.services.bdd.spec.utilops.UtilVerbs.sleepFor) DUPLICATE_TRANSACTION(com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DEFAULT_MINS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS) STANDARD_PERMISSIBLE_PRECHECKS(com.hedera.services.bdd.spec.infrastructure.OpProvider.STANDARD_PERMISSIBLE_PRECHECKS) Map(java.util.Map) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiCryptoTransfer.tinyBarsFromTo(com.hedera.services.bdd.spec.transactions.crypto.HapiCryptoTransfer.tinyBarsFromTo) SystemUtils.getHostName(org.apache.commons.lang3.SystemUtils.getHostName) TxnVerbs.scheduleCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.scheduleCreate) UtilVerbs.logIt(com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt) UtilVerbs.noOp(com.hedera.services.bdd.spec.utilops.UtilVerbs.noOp) List(java.util.List) Logger(org.apache.logging.log4j.Logger) LoadTest.initialBalance(com.hedera.services.bdd.spec.utilops.LoadTest.initialBalance) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) BUSY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) PerfUtilOps.scheduleOpsEnablement(com.hedera.services.bdd.suites.perf.PerfUtilOps.scheduleOpsEnablement) PLATFORM_TRANSACTION_NOT_CREATED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation)

Example 3 with DEFAULT_MINS_FOR_RECONNECT_TESTS

use of com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS in project hedera-services by hashgraph.

the class CreateTokensBeforeReconnect method runCreateTopics.

private HapiApiSpec runCreateTopics() {
    PerfTestLoadSettings settings = new PerfTestLoadSettings(TOKEN_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_TOKEN_THREADS_FOR_RECONNECT_TESTS);
    Supplier<HapiSpecOperation[]> createBurst = () -> new HapiSpecOperation[] { generateTopicCreateOperation() };
    return defaultHapiSpec("RunCreateTokens").given(logIt(ignore -> settings.toString())).when().then(defaultLoadTest(createBurst, settings));
}
Also used : TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKENS_PER_ACCOUNT_LIMIT_EXCEEDED) UNKNOWN(com.hederahashgraph.api.proto.java.ResponseCodeEnum.UNKNOWN) TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT(com.hederahashgraph.api.proto.java.ResponseCodeEnum.TOKEN_ALREADY_ASSOCIATED_TO_ACCOUNT) UtilVerbs.logIt(com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) SUCCESS(com.hederahashgraph.api.proto.java.ResponseCodeEnum.SUCCESS) Supplier(java.util.function.Supplier) LoadTest.defaultLoadTest(com.hedera.services.bdd.spec.utilops.LoadTest.defaultLoadTest) UtilVerbs.noOp(com.hedera.services.bdd.spec.utilops.UtilVerbs.noOp) List(java.util.List) Logger(org.apache.logging.log4j.Logger) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DEFAULT_MINS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) BUSY(com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY) HapiApiSpec(com.hedera.services.bdd.spec.HapiApiSpec) LogManager(org.apache.logging.log4j.LogManager) TxnVerbs.tokenCreate(com.hedera.services.bdd.spec.transactions.TxnVerbs.tokenCreate) PLATFORM_TRANSACTION_NOT_CREATED(com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED) PerfTestLoadSettings(com.hedera.services.bdd.suites.perf.PerfTestLoadSettings) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation)

Example 4 with DEFAULT_MINS_FOR_RECONNECT_TESTS

use of com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS in project hedera-services by hashgraph.

the class CreateTopicsBeforeReconnect method runCreateTopics.

private HapiApiSpec runCreateTopics() {
    PerfTestLoadSettings settings = new PerfTestLoadSettings(TOPIC_CREATION_RECONNECT_TPS, DEFAULT_MINS_FOR_RECONNECT_TESTS, DEFAULT_THREADS_FOR_RECONNECT_TESTS);
    Supplier<HapiSpecOperation[]> createBurst = () -> new HapiSpecOperation[] { generateTopicCreateOperation() };
    return defaultHapiSpec("RunCreateTopics").given(logIt(ignore -> settings.toString())).when().then(defaultLoadTest(createBurst, settings));
}
Also used : 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) DEFAULT_THREADS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_THREADS_FOR_RECONNECT_TESTS) LoadTest.defaultLoadTest(com.hedera.services.bdd.spec.utilops.LoadTest.defaultLoadTest) UtilVerbs.noOp(com.hedera.services.bdd.spec.utilops.UtilVerbs.noOp) List(java.util.List) Logger(org.apache.logging.log4j.Logger) DUPLICATE_TRANSACTION(com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION) HapiApiSuite(com.hedera.services.bdd.suites.HapiApiSuite) AtomicInteger(java.util.concurrent.atomic.AtomicInteger) DEFAULT_MINS_FOR_RECONNECT_TESTS(com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS) HapiApiSpec.defaultHapiSpec(com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation) 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) HapiSpecOperation(com.hedera.services.bdd.spec.HapiSpecOperation)

Aggregations

HapiApiSpec (com.hedera.services.bdd.spec.HapiApiSpec)4 HapiApiSpec.defaultHapiSpec (com.hedera.services.bdd.spec.HapiApiSpec.defaultHapiSpec)4 HapiSpecOperation (com.hedera.services.bdd.spec.HapiSpecOperation)4 LoadTest.defaultLoadTest (com.hedera.services.bdd.spec.utilops.LoadTest.defaultLoadTest)4 UtilVerbs.logIt (com.hedera.services.bdd.spec.utilops.UtilVerbs.logIt)4 UtilVerbs.noOp (com.hedera.services.bdd.spec.utilops.UtilVerbs.noOp)4 HapiApiSuite (com.hedera.services.bdd.suites.HapiApiSuite)4 PerfTestLoadSettings (com.hedera.services.bdd.suites.perf.PerfTestLoadSettings)4 DEFAULT_MINS_FOR_RECONNECT_TESTS (com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_MINS_FOR_RECONNECT_TESTS)4 BUSY (com.hederahashgraph.api.proto.java.ResponseCodeEnum.BUSY)4 PLATFORM_TRANSACTION_NOT_CREATED (com.hederahashgraph.api.proto.java.ResponseCodeEnum.PLATFORM_TRANSACTION_NOT_CREATED)4 List (java.util.List)4 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)4 Supplier (java.util.function.Supplier)4 LogManager (org.apache.logging.log4j.LogManager)4 Logger (org.apache.logging.log4j.Logger)4 DEFAULT_THREADS_FOR_RECONNECT_TESTS (com.hedera.services.bdd.suites.reconnect.CreateAccountsBeforeReconnect.DEFAULT_THREADS_FOR_RECONNECT_TESTS)3 DUPLICATE_TRANSACTION (com.hederahashgraph.api.proto.java.ResponseCodeEnum.DUPLICATE_TRANSACTION)3 STANDARD_PERMISSIBLE_PRECHECKS (com.hedera.services.bdd.spec.infrastructure.OpProvider.STANDARD_PERMISSIBLE_PRECHECKS)1 TxnVerbs.createTopic (com.hedera.services.bdd.spec.transactions.TxnVerbs.createTopic)1