Skip to content

Commit

Permalink
[FAB-15312] fix s390x builds
Browse files Browse the repository at this point in the history
Increase timeouts on s390x and add work around for crosschaincode issue

Change-Id: I9adf8153c772792a43dd077dd61e74d407bd6b92
Signed-off-by: James Taylor <jamest@uk.ibm.com>
  • Loading branch information
jt-nti committed May 10, 2019
1 parent aba36b0 commit 5f87412
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 7 deletions.
3 changes: 3 additions & 0 deletions test/fv/crosschaincode.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ describe('Chaincode crosschaincode', () => {

await utils.installAndInstantiate(suite, 'org.mynamespace.crosschaincode:instantiate');
await utils.installAndInstantiate(suite2, 'org.mynamespace.crosschaincode2:instantiate');

// kick crosschaincode2 on org2 - shouldn't need this!
await utils.query(suite2, 'org.mynamespace.crosschaincode2:getKey', ['key1']);
});

describe('Invoke', () => {
Expand Down
18 changes: 11 additions & 7 deletions test/fv/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ const fs = require('fs');
const path = require('path');
const getTLSArgs = require('../../build/test/utils').getTLSArgs;

// Increase the timeouts on zLinux!
const arch = require('os').arch();
const multiplier = arch === 's390x' ? 2 : 1;

function getPackageVersion() {
const packageJsonPath = path.join(__dirname, './../../package.json');
const packageJson = fs.readFileSync(packageJsonPath);
Expand Down Expand Up @@ -110,12 +114,12 @@ async function installAndInstantiate(ccName, instantiateFunc, instantiateArgs) {
}

const TIMEOUTS = {
LONGEST_STEP : 24000 * 1000,
LONG_STEP : 240 * 1000,
MED_STEP : 120 * 1000,
SHORT_STEP: 60 * 1000,
LONG_INC : 30 * 1000,
MED_INC : 10 * 1000,
SHORT_INC: 5 * 1000
LONGEST_STEP : 24000 * 1000 * multiplier,
LONG_STEP : 240 * 1000 * multiplier,
MED_STEP : 120 * 1000 * multiplier,
SHORT_STEP: 60 * 1000 * multiplier,
LONG_INC : 30 * 1000 * multiplier,
MED_INC : 10 * 1000 * multiplier,
SHORT_INC: 5 * 1000 * multiplier
};
module.exports = {installAndInstantiate, invoke, query, packPackages, deletePackages, TIMEOUTS};

0 comments on commit 5f87412

Please sign in to comment.