Skip to content

Commit 8bedf1a

Browse files
committed
Fix load tests for p23
1 parent 0a9c7c7 commit 8bedf1a

File tree

2 files changed

+18
-4
lines changed

2 files changed

+18
-4
lines changed

services/horizon/internal/integration/generate_ledgers_test.go

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type sorobanTransaction struct {
3737
}
3838

3939
func TestGenerateLedgers(t *testing.T) {
40-
return
40+
4141
var transactionsPerLedger, ledgers, transfersPerTx int
4242
var output bool
4343
var networkPassphrase string
@@ -440,8 +440,18 @@ func merge(t *testing.T, networkPassphrase string, ledgers []xdr.LedgerCloseMeta
440440
var curCount int
441441
for _, ledger := range ledgers {
442442
transactionCount := ledger.CountTransactions()
443-
require.Empty(t, ledger.V1.EvictedKeys)
444-
require.Empty(t, ledger.V1.UpgradesProcessing)
443+
444+
switch ledger.V {
445+
case 1:
446+
require.Empty(t, ledger.V1.EvictedKeys)
447+
require.Empty(t, ledger.V1.UpgradesProcessing)
448+
case 2:
449+
require.Empty(t, ledger.V2.EvictedKeys)
450+
require.Empty(t, ledger.V2.UpgradesProcessing)
451+
default:
452+
t.Fatalf("Invalid ledger meta version: %d", ledger.V)
453+
}
454+
445455
if transactionCount == 0 {
446456
continue
447457
}

services/horizon/internal/integration/ingestion_load_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,11 @@ import (
1818
)
1919

2020
func TestLoadTestLedgerBackend(t *testing.T) {
21-
return
21+
// TODO: Generate test data using LedgerCloseMetaV2 to run this test for Protocol 23 and above
22+
if integration.GetCoreMaxSupportedProtocol() > 22 {
23+
t.Skip("This test run does not support greater than Protocol 22")
24+
}
25+
2226
itest := integration.NewTest(t, integration.Config{
2327
NetworkPassphrase: loadTestNetworkPassphrase,
2428
})

0 commit comments

Comments
 (0)