Skip to content

Commit 51ec113

Browse files
author
Krishna Harsha Voora
committed
[FAB-12158] UT under privacyenabledstate fails
UTs under packages privacyenabledstate, pvtstatepurgemgmt statecouchdb are failing as they exceed maxRetriesOnStartup. This PR increases maxRetriesOnStartup thus providing room to execute aforementioned UTs. Change-Id: Ic61388c8f7497eaadc2ae4147af573b5e108409c Signed-off-by: Krishna Harsha Voora <krishvoor@in.ibm.com>
1 parent 71a7713 commit 51ec113

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

core/ledger/kvledger/txmgmt/privacyenabledstate/test_exports.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ func (env *CouchDBCommonStorageTestEnv) Init(t testing.TB) {
109109
viper.Set("ledger.state.couchDBConfig.username", "")
110110
viper.Set("ledger.state.couchDBConfig.password", "")
111111
viper.Set("ledger.state.couchDBConfig.maxRetries", 3)
112-
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 10)
112+
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 20)
113113
viper.Set("ledger.state.couchDBConfig.requestTimeout", time.Second*35)
114114

115115
env.bookkeeperTestEnv = bookkeeping.NewTestEnv(t)

core/ledger/kvledger/txmgmt/statedb/statecouchdb/statecouchdb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ func testMain(m *testing.M) int {
4949
viper.Set("ledger.state.couchDBConfig.username", "")
5050
viper.Set("ledger.state.couchDBConfig.password", "")
5151
viper.Set("ledger.state.couchDBConfig.maxRetries", 3)
52-
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 10)
52+
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 20)
5353
viper.Set("ledger.state.couchDBConfig.requestTimeout", time.Second*35)
5454
// Disable auto warm to avoid error logs when the couchdb database has been dropped
5555
viper.Set("ledger.state.couchDBConfig.autoWarmIndexes", false)

core/ledger/util/couchdb/config_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ func TestGetCouchDBDefinition(t *testing.T) {
2222
assert.Equal(t, "", couchDBDef.Username)
2323
assert.Equal(t, "", couchDBDef.Password)
2424
assert.Equal(t, 3, couchDBDef.MaxRetries)
25-
assert.Equal(t, 10, couchDBDef.MaxRetriesOnStartup)
25+
assert.Equal(t, 20, couchDBDef.MaxRetriesOnStartup)
2626
assert.Equal(t, time.Second*35, couchDBDef.RequestTimeout)
2727
}

core/ledger/util/couchdb/couchdb_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ func testMain(m *testing.M) int {
7777
viper.Set("ledger.state.couchDBConfig.username", "")
7878
viper.Set("ledger.state.couchDBConfig.password", "")
7979
viper.Set("ledger.state.couchDBConfig.maxRetries", 3)
80-
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 10)
80+
viper.Set("ledger.state.couchDBConfig.maxRetriesOnStartup", 20)
8181
viper.Set("ledger.state.couchDBConfig.requestTimeout", time.Second*35)
8282
viper.Set("ledger.state.couchDBConfig.createGlobalChangesDB", true)
8383

0 commit comments

Comments
 (0)