diff --git a/test/integration/fabric-ca-services-tests.js b/test/integration/fabric-ca-services-tests.js index 69baad9679..d6a2fd80e2 100644 --- a/test/integration/fabric-ca-services-tests.js +++ b/test/integration/fabric-ca-services-tests.js @@ -274,6 +274,7 @@ test('\n\n ** FabricCAServices: Test enroll() With Dynamic CSR **\n\n', function affiliation: 'org1.department2', attrs: [ {name: 'hf.Registrar.Roles', value: 'client'}, + {name: 'hf.Registrar.Attributes', value: '*'}, {name:'dfattrib',value:'default', ecert:true}, {name:'myattrib',value:'somevalue and lots of other information'} ]}, member); diff --git a/test/integration/network-config.js b/test/integration/network-config.js index d1405b15c0..f28cb3d309 100644 --- a/test/integration/network-config.js +++ b/test/integration/network-config.js @@ -152,7 +152,7 @@ test('\n\n***** use the network configuration file *****\n\n', function(t) { logger.debug(' response ::%j',result); t.pass('Successfully created the channel.'); if(result.status && result.status === 'SUCCESS') { - return sleep(5000); + return sleep(10000); } else { t.fail('Failed to create the channel. '); throw new Error('Failed to create the channel. '); @@ -383,28 +383,6 @@ test('\n\n***** use the network configuration file *****\n\n', function(t) { }).then((user)=> { t.pass('Successfully enrolled user \'user1\' for org1'); - let tx_id = client.newTransactionID(); // get a non admin transaction ID - var request = { - chaincodeId : 'example', - fcn: 'move', - args: ['a', 'b','100'], - txId: tx_id - //targets - Letting default to all endorsing peers defined on the channel in the network configuration - }; - - // put in a very small timeout to force a failure, thereby checking that the timeout value was being used - return channel.sendTransactionProposal(request, 1); //logged in as org1 user - }).then((results) => { - var proposalResponses = results[0]; - for(var i in proposalResponses) { - let proposal_response = proposalResponses[i]; - if( proposal_response instanceof Error && proposal_response.toString().indexOf('REQUEST_TIMEOUT') > 0) { - t.pass('Successfully cause a timeout error by setting the timeout setting to 1'); - } else { - t.fail('Failed to get the timeout error'); - } - } - // try again ...this time use a longer timeout let tx_id = client.newTransactionID(); // get a non admin transaction ID query_tx_id = tx_id.getTransactionID(); @@ -621,6 +599,28 @@ test('\n\n***** use the network configuration file *****\n\n', function(t) { logger.debug(' queryTransaction ::%j',results); t.equals(0, results.validationCode, 'Should be able to find our transaction validationCode by admin'); + let tx_id = client.newTransactionID(); // get a non admin transaction ID + var request = { + chaincodeId : 'example', + fcn: 'move', + args: ['a', 'b','100'], + txId: tx_id + //targets - Letting default to all endorsing peers defined on the channel in the network configuration + }; + + // put in a very small timeout to force a failure, thereby checking that the timeout value was being used + return channel.sendTransactionProposal(request, 1); //logged in as org1 user + }).then((results) => { + var proposalResponses = results[0]; + for(var i in proposalResponses) { + let proposal_response = proposalResponses[i]; + if( proposal_response instanceof Error && proposal_response.toString().indexOf('REQUEST_TIMEOUT') > 0) { + t.pass('Successfully cause a timeout error by setting the timeout setting to 1'); + } else { + t.fail('Failed to get the timeout error'); + } + } + return true; }).then((results) => { t.pass('Testing has complete successfully');