Skip to content

Commit

Permalink
Add to apply-load test
Browse files Browse the repository at this point in the history
  • Loading branch information
sisuresh committed Nov 8, 2024
1 parent 57087e7 commit 58da6e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/simulation/test/LoadGeneratorTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "crypto/SecretKey.h"
#include "ledger/LedgerManager.h"
#include "lib/catch.hpp"
#include "main/CheckMergingWork.h"
#include "main/Config.h"
#include "scp/QuorumSetUtils.h"
#include "simulation/ApplyLoad.h"
Expand All @@ -14,6 +15,7 @@
#include "test/test.h"
#include "transactions/test/SorobanTxTestUtils.h"
#include "util/Math.h"
#include "work/WorkScheduler.h"
#include <fmt/format.h>

using namespace stellar;
Expand Down Expand Up @@ -871,6 +873,11 @@ TEST_CASE("apply load", "[loadgen][applyload]")
cpuInsRatioExclVm.Clear();
for (size_t i = 0; i < 100; ++i)
{
auto checkMergingWork =
app->getWorkScheduler().executeWork<CheckMergingWork>();
releaseAssert(checkMergingWork->getState() ==
BasicWork::State::WORK_SUCCESS);

al.benchmark();
}
REQUIRE(al.successRate() - 1.0 < std::numeric_limits<double>::epsilon());
Expand Down

0 comments on commit 58da6e6

Please sign in to comment.