From 804a6c73618e97c50670a850805bc1e269e89f8b Mon Sep 17 00:00:00 2001 From: Erik Onarheim Date: Sat, 12 Feb 2022 11:10:25 -0600 Subject: [PATCH] chore: Updates to improve test flakiness --- appveyor.yml | 2 +- karma.conf.browsers.js | 6 +++++- src/spec/DebugTextSpec.ts | 2 +- src/spec/ExcaliburGraphicsContextSpec.ts | 3 ++- 4 files changed, 9 insertions(+), 4 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 75431c819..ce05e32fa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -7,7 +7,7 @@ init: # What combinations to test environment: matrix: - - nodejs_version: '14' + - nodejs_version: '16' platform: - x64 install: diff --git a/karma.conf.browsers.js b/karma.conf.browsers.js index 8c2bcdcff..5ec7f165f 100644 --- a/karma.conf.browsers.js +++ b/karma.conf.browsers.js @@ -10,7 +10,8 @@ module.exports = (config) => { browserStack: { project: 'Excalibur', username: process.env.BS_USERNAME, - accessKey: process.env.BS_PASSWORD + accessKey: process.env.BS_PASSWORD, + timeout: 600 }, singleRun: true, frameworks: ['jasmine'], @@ -103,7 +104,10 @@ module.exports = (config) => { // Show a list of test clients, 'always', 'never' or 'ifneeded' browserList: 'always' }, + browserDisconnectTimeout : 10000, + browserDisconnectTolerance : 1, browserNoActivityTimeout: 60000, // appveyor is slow :( + captureTimeout : 4*60*1000, // define browsers customLaunchers: { bs_latest_chrome_win10: { diff --git a/src/spec/DebugTextSpec.ts b/src/spec/DebugTextSpec.ts index 22c8a7cd7..b952f45a0 100644 --- a/src/spec/DebugTextSpec.ts +++ b/src/spec/DebugTextSpec.ts @@ -57,6 +57,6 @@ describe('DebugText', () => { ctx.flush(); - await expectAsync(flushWebGLCanvasTo2D(canvasElement)).toEqualImage('src/spec/images/DebugTextSpec/draw-webgl.png'); + await expectAsync(flushWebGLCanvasTo2D(canvasElement)).toEqualImage('src/spec/images/DebugTextSpec/draw-webgl.png', .94); }); }); diff --git a/src/spec/ExcaliburGraphicsContextSpec.ts b/src/spec/ExcaliburGraphicsContextSpec.ts index cb406f71f..af14052c2 100644 --- a/src/spec/ExcaliburGraphicsContextSpec.ts +++ b/src/spec/ExcaliburGraphicsContextSpec.ts @@ -408,7 +408,8 @@ describe('The ExcaliburGraphicsContext', () => { expect(imageRenderer.flush).toHaveBeenCalledTimes(1); await expectAsync(flushWebGLCanvasTo2D(canvasElement)).toEqualImage( - 'src/spec/images/ExcaliburGraphicsContextSpec/painter-order-circle-image-rect.png' + 'src/spec/images/ExcaliburGraphicsContextSpec/painter-order-circle-image-rect.png', + .95 ); });