Skip to content

Commit 2bd9005

Browse files
Chris Elderghaskins
Chris Elder
authored andcommitted
[FAB-3244] Re-enable CouchDB bad connect unit test
The CouchDB test bad connection unit test was disabled when retry logic was added. Hard coding the maxRetriesOnStartup to 3 will allow the test to complete without a excessive delay in overall test execution. Change-Id: I834ebe0b7ef6fb5859286edefa2fffac4e4249ec Signed-off-by: Chris Elder <[email protected]>
1 parent 8ce1073 commit 2bd9005

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

core/ledger/util/couchdb/couchdb_test.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -209,15 +209,12 @@ func TestDBBadDatabaseName(t *testing.T) {
209209

210210
func TestDBBadConnection(t *testing.T) {
211211

212-
// TestDBBadConnectionDef skipped since retry logic stalls the unit tests for two minutes.
213-
// TODO Re-enable once configurable retry logic is introduced
214-
t.Skip()
215-
216212
if ledgerconfig.IsCouchDBEnabled() {
217213

218214
//create a new instance and database object
215+
//Limit the maxRetriesOnStartup to 3 in order to reduce time for the failure
219216
_, err := CreateCouchInstance(badConnectURL, couchDBDef.Username, couchDBDef.Password,
220-
couchDBDef.MaxRetries, couchDBDef.MaxRetriesOnStartup, couchDBDef.RequestTimeout)
217+
couchDBDef.MaxRetries, 3, couchDBDef.RequestTimeout)
221218
testutil.AssertError(t, err, fmt.Sprintf("Error should have been thrown for a bad connection"))
222219
}
223220
}

0 commit comments

Comments
 (0)