Skip to content

Commit

Permalink
Update changelog. Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
urvisavla committed Oct 3, 2024
1 parent be2f5b4 commit bcab2c8
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
8 changes: 8 additions & 0 deletions services/horizon/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this
file. This project adheres to [Semantic Versioning](http://semver.org/).
## Pending

### Breaking Changes

- `--parallel-job-size` configuration parameter for the `stellar-horizon db reingest` command has been removed.
Job size will be automatically determined based on the number of workers (configuration parameter --parallel-workers), distributing
the range equally among them. The minimum job size will remain 64 ledgers and the start and end ledger range will be rounded to
the nearest checkpoint.([5484](https://github.com/stellar/go/pull/5484))

## 2.32.0

Expand Down
15 changes: 15 additions & 0 deletions services/horizon/cmd/db_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,21 @@ func (s *DBCommandsTestSuite) BeforeTest(suiteName string, testName string) {
s.rootCmd = NewRootCmd()
}

func (s *DBCommandsTestSuite) TestInvalidParameterParallelJobSize() {
s.rootCmd.SetArgs([]string{
"db", "reingest", "range",
"--db-url", s.db.DSN,
"--network", "testnet",
"--parallel-workers", "2",
"--parallel-job-size", "10",
"--ledgerbackend", "datastore",
"--datastore-config", "../internal/ingest/testdata/config.storagebackend.toml",
"2",
"10"})

require.Equal(s.T(), "unknown flag: --parallel-job-size", s.rootCmd.Execute().Error())
}

func (s *DBCommandsTestSuite) TestDbReingestAndFillGapsCmds() {
tests := []struct {
name string
Expand Down

0 comments on commit bcab2c8

Please sign in to comment.