Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
SirTyson committed Jan 15, 2025
1 parent 4abc76a commit 051a3e4
Show file tree
Hide file tree
Showing 5 changed files with 647 additions and 642 deletions.
3 changes: 2 additions & 1 deletion src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ TEST_FILES = $(TESTDATA_DIR)/stellar-core_example.cfg $(TESTDATA_DIR)/stellar-co
$(TESTDATA_DIR)/stellar-core_testnet.cfg $(TESTDATA_DIR)/stellar-core_testnet_legacy.cfg \
$(TESTDATA_DIR)/stellar-history.testnet.6714239.json $(TESTDATA_DIR)/stellar-history.livenet.15686975.json \
$(TESTDATA_DIR)/stellar-core_testnet_validator.cfg $(TESTDATA_DIR)/stellar-core_example_validators.cfg \
$(TESTDATA_DIR)/stellar-history.testnet.6714239.networkPassphrase.json
$(TESTDATA_DIR)/stellar-history.testnet.6714239.networkPassphrase.json \
$(TESTDATA_DIR)/stellar-history.testnet.6714239.networkPassphrase.v2.json

BUILT_SOURCES = $(SRC_X_FILES:.x=.h) main/StellarCoreVersion.cpp main/XDRFilesSha256.cpp $(TEST_FILES)

Expand Down
12 changes: 8 additions & 4 deletions src/history/test/HistoryTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,9 @@ TEST_CASE_VERSIONS(

BucketTestUtils::for_versions_with_differing_bucket_logic(
cfg, [&](Config const& cfg) {
Application::pointer app = createTestApplication(clock, cfg);
auto app =
createTestApplication<BucketTestUtils::BucketTestApplication>(
clock, cfg);
auto& hm = app->getHistoryManager();
auto& lm = app->getLedgerManager();
auto& bl = app->getBucketManager().getLiveBucketList();
Expand All @@ -1431,9 +1433,11 @@ TEST_CASE_VERSIONS(
{
auto lcl = lm.getLastClosedLedgerHeader();
lcl.header.ledgerSeq += 1;
BucketTestUtils::addLiveBatchAndUpdateSnapshot(
*app, lcl.header, {},
LedgerTestUtils::generateValidUniqueLedgerEntries(8), {});
lm.setNextLedgerEntryBatchForBucketTesting(
{},
LedgerTestUtils::generateValidLedgerEntriesWithExclusions(
{LedgerEntryType::CONFIG_SETTING}, 8),
{});
clock.crank(true);
}

Expand Down
8 changes: 4 additions & 4 deletions src/history/test/HistoryTestsUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,11 @@ CatchupSimulation::generateRandomLedger(uint32_t version)
uint32_t inclusion = 100;

sorobanTxs.push_back(createUploadWasmTx(
getApp(), stroopy, inclusion, DEFAULT_TEST_RESOURCE_FEE, res,
{}, 0, rand_uniform(101, 1'000)));
getApp(), stroopy, inclusion, DEFAULT_TEST_RESOURCE_FEE * 5,
res, {}, 0, rand_uniform(101, 2'000)));
sorobanTxs.push_back(createUploadWasmTx(
getApp(), eve, inclusion * 5, DEFAULT_TEST_RESOURCE_FEE, res,
{}, 0, rand_uniform(101, 1'000)));
getApp(), eve, inclusion * 5, DEFAULT_TEST_RESOURCE_FEE * 5,
res, {}, 0, rand_uniform(101, 2'000)));
check = true;
}
}
Expand Down
Loading

0 comments on commit 051a3e4

Please sign in to comment.