@@ -225,17 +225,18 @@ TEST_CASE("generate soroban load", "[loadgen][soroban]")
225
225
SECTION (" misconfigured soroban loadgen mode usage" )
226
226
{
227
227
// Users are required to run SOROBAN_INVOKE_SETUP_LOAD before running
228
- // SOROBAN_INVOKE_LOAD. Running a SOROBAN_INVOKE_LOAD without a prior
229
- // SOROBAN_INVOKE_SETUP_LOAD should throw a helpful exception explaining
230
- // the misconfiguration.
231
- auto invokeLoadCfg =
232
- GeneratedLoadConfig::txLoad (LoadGenMode::SOROBAN_INVOKE,
233
- /* nAccounts*/ 1 , /* numSorobanTxs */ 1 ,
234
- /* txRate */ 1 );
235
- REQUIRE_THROWS_WITH (
236
- loadGen.generateLoad (invokeLoadCfg),
237
- " Before running MODE::SOROBAN_INVOKE, please run "
238
- " MODE::SOROBAN_INVOKE_SETUP to set up your contract first." );
228
+ // SOROBAN_INVOKE_LOAD. If they do not, load generation will fail. An
229
+ // error message will be logged and `loadgen.run.failed` will be
230
+ // incremented.
231
+ auto invokeLoadCfg = GeneratedLoadConfig::txLoad (
232
+ LoadGenMode::SOROBAN_INVOKE,
233
+ /* nAccounts */ 1 , /* numSorobanTxs */ 1 ,
234
+ /* txRate */ 1 );
235
+ auto & loadGenFailed =
236
+ app.getMetrics ().NewMeter ({" loadgen" , " run" , " failed" }, " run" );
237
+ auto failedCount = loadGenFailed.count ();
238
+ loadGen.generateLoad (invokeLoadCfg);
239
+ REQUIRE (loadGenFailed.count () == failedCount + 1 );
239
240
}
240
241
int64_t numTxsBefore = getSuccessfulTxCount ();
241
242
0 commit comments