Skip to content

Commit

Permalink
comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBrady committed Nov 25, 2024
1 parent 1bb21b5 commit 170071b
Showing 1 changed file with 3 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/simulation/test/LoadGeneratorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,22 +144,12 @@ TEST_CASE("handle soroban loadgen mode misconfiguration gracefully",
auto& loadGen = app.getLoadGenerator();

// Users are required to run SOROBAN_INVOKE_SETUP_LOAD before running
// SOROBAN_INVOKE_LOAD.
// This is an example call.
// loadGen.generateLoad(GeneratedLoadConfig::createSorobanInvokeSetupLoad(
///* nAccounts */ nAccounts, numInstances,
///* txRate */ 1));
// SOROBAN_INVOKE_LOAD. Running a SOROBAN_INVOKE_LOAD without a prior
// SOROBAN_INVOKE_SETUP_LOAD should throw a helpful exception explaining
// the misconfiguration.
auto invokeLoadCfg = GeneratedLoadConfig::txLoad(
LoadGenMode::SOROBAN_INVOKE, /* nAccounts*/ 1, /* numSorobanTxs */ 1,
/* txRate */ 1);

// Plan: See how this acts when run without changes.
// Then, add a bit of state if needed to load genreator to
// store whether an account has called invoke setup
// and if not, print a warning/error or throw an exception
// probably thats best since its fatal anyway but its confusing at the
// moment.

REQUIRE_THROWS_WITH(
loadGen.generateLoad(invokeLoadCfg),
"Before running MODE::SOROBAN_INVOKE, please run "
Expand Down

0 comments on commit 170071b

Please sign in to comment.