Skip to content

Commit

Permalink
[FAB-3244] Re-enable CouchDB bad connect unit test
Browse files Browse the repository at this point in the history
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 <chris.elder@us.ibm.com>
  • Loading branch information
Chris Elder authored and ghaskins committed Apr 24, 2017
1 parent 8ce1073 commit 2bd9005
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions core/ledger/util/couchdb/couchdb_test.go
Expand Up @@ -209,15 +209,12 @@ func TestDBBadDatabaseName(t *testing.T) {

func TestDBBadConnection(t *testing.T) {

// TestDBBadConnectionDef skipped since retry logic stalls the unit tests for two minutes.
// TODO Re-enable once configurable retry logic is introduced
t.Skip()

if ledgerconfig.IsCouchDBEnabled() {

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

0 comments on commit 2bd9005

Please sign in to comment.