Skip to content

Commit

Permalink
Handle unreachable pages + remove some tests from exceptions (#7490)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexKamaev authored Feb 3, 2023
1 parent f426301 commit af6cb5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
7 changes: 0 additions & 7 deletions gulp/constants/functional-test-globs.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,13 @@ const PROXYLESS_TESTS_GLOB = [
'!test/functional/fixtures/live/test.js',
'!test/functional/fixtures/api/es-next/navigate-to-and-test-page/test.js',
'!test/functional/fixtures/api/es-next/request/test.js',
'!test/functional/fixtures/regression/gh-1138/test.js',
'!test/functional/fixtures/regression/gh-1311/test.js',
'!test/functional/fixtures/regression/gh-1388/test.js',
'!test/functional/fixtures/regression/gh-1521/test.js',
'!test/functional/fixtures/regression/gh-1846/test.js',
'!test/functional/fixtures/regression/gh-2546/test.js',
'!test/functional/fixtures/regression/gh-2601/test.js',
'!test/functional/fixtures/hammerhead/gh-2622/test.js',
'!test/functional/fixtures/regression/gh-2861/test.js',
'!test/functional/fixtures/regression/gh-3127/test.js',
'!test/functional/fixtures/regression/gh-423/test.js',
'!test/functional/fixtures/regression/gh-5447/test.js',
'!test/functional/fixtures/regression/gh-5886/test.js',
'!test/functional/fixtures/regression/gh-664/test.js',
'!test/functional/fixtures/regression/hammerhead/gh-2350/test.js',
];

Expand Down
2 changes: 1 addition & 1 deletion src/proxyless/request-pipeline/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ export default class ProxylessRequestPipeline extends ProxylessApiBase {
private async _handleOtherRequests (event: RequestPausedEvent): Promise<void> {
requestPipelineOtherRequestLogger('%r', event);

if (isRequest(event) || isRedirectStatusCode(event.responseStatusCode)) {
if (!event.responseErrorReason && (isRequest(event) || isRedirectStatusCode(event.responseStatusCode))) {
this._contextInfo.init(event);

await this.requestHookEventProvider.onRequest(event, this._contextInfo);
Expand Down
5 changes: 2 additions & 3 deletions test/functional/fixtures/page-error/test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const { expect } = require('chai');
const { skipInProxyless } = require('../../utils/skip-in');
const { expect } = require('chai');

describe('Handle page error', function () {
skipInProxyless('Should fail if the error is not caught in the test', function () {
it('Should fail if the error is not caught in the test', function () {
return runTests('./testcafe-fixtures/page-error-test.js', 'Do not handle', { shouldFail: true })
.catch(function (errs) {
expect(errs[0]).contains('Failed to load the page at "http://some-unreachable.url/". ' +
Expand Down

0 comments on commit af6cb5c

Please sign in to comment.