Skip to content

Commit

Permalink
#4911: revert some of prior change, need to keep the time.sleep on so…
Browse files Browse the repository at this point in the history
…me parameters_test cases due to ingest bug stated in comments
  • Loading branch information
sreuland committed Jul 18, 2024
1 parent 38f2b6d commit dee1424
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions services/horizon/internal/integration/parameters_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
"strings"
"sync"
"testing"
"time"

"github.com/spf13/cobra"

Expand Down Expand Up @@ -157,6 +158,9 @@ func TestInvalidNetworkParameters(t *testing.T) {
testConfig.HorizonIngestParameters = localParams
test := integration.NewTest(t, *testConfig)
err := test.StartHorizon(true)
// Adding sleep as a workaround for the race condition in the ingestion system.
// https://github.com/stellar/go/issues/5005
time.Sleep(2 * time.Second)
assert.Equal(t, testCase.errMsg, err.Error())
})
}
Expand Down Expand Up @@ -197,6 +201,9 @@ func TestNetworkParameter(t *testing.T) {
testConfig.HorizonIngestParameters = localParams
test := integration.NewTest(t, *testConfig)
err := test.StartHorizon(true)
// Adding sleep as a workaround for the race condition in the ingestion system.
// https://github.com/stellar/go/issues/5005
time.Sleep(2 * time.Second)
assert.NoError(t, err)
assert.Equal(t, test.GetHorizonIngestConfig().HistoryArchiveURLs, tt.historyArchiveURLs)
assert.Equal(t, test.GetHorizonIngestConfig().NetworkPassphrase, tt.networkPassphrase)
Expand Down Expand Up @@ -235,6 +242,9 @@ func TestNetworkEnvironmentVariable(t *testing.T) {
testConfig.HorizonEnvironment = map[string]string{"NETWORK": networkValue}
test := integration.NewTest(t, *testConfig)
err := test.StartHorizon(true)
// Adding sleep as a workaround for the race condition in the ingestion system.
// https://github.com/stellar/go/issues/5005
time.Sleep(2 * time.Second)
assert.NoError(t, err)
})
}
Expand Down

0 comments on commit dee1424

Please sign in to comment.