From a7d0b41d9865ffb9bdda497f77c316938f44cd46 Mon Sep 17 00:00:00 2001 From: Richard Moore Date: Tue, 9 Jul 2019 20:16:37 -0400 Subject: [PATCH] Reduce number of HDNode tests which cause TravisCI to timeout. --- tests/test-hdnode.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test-hdnode.js b/tests/test-hdnode.js index 62f9d9c20..ed164c5ff 100644 --- a/tests/test-hdnode.js +++ b/tests/test-hdnode.js @@ -5,11 +5,20 @@ var assert = require('assert'); var utils = require('./utils'); var ethers = utils.getEthers(__filename); +function skip(name) { + var match = name.match(/^random-([0-9]+)$/); + if (match && parseInt(match[1]) > 512) { + return true; + } + return false; +} + describe('Test HD Node Derivation', function(test) { var tests = utils.loadTests('hdnode'); tests.forEach(function(test) { - it('Derives the HD nodes - ' + test.name, function() { + if (skip(test.name)) { return; } + it('Derives the HD nodes - ' + test.name, function() { this.timeout(10000); //var rootNode = new ethers.utils.HDNode.fromSeed(test.seed); @@ -87,6 +96,7 @@ describe('Test HD Node Derivation', function(test) { describe('Test HD Mnemonic Phrases', function testMnemonic() { var tests = utils.loadTests('hdnode'); tests.forEach(function(test) { + if (skip(test.name)) { return; } it(('converts mnemonic phrases - ' + test.name), function() { this.timeout(1000000);