Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrent Chrome can't reconnect after restart #4554

Closed
AndreyBelym opened this issue Dec 6, 2019 · 1 comment
Closed

Concurrent Chrome can't reconnect after restart #4554

AndreyBelym opened this issue Dec 6, 2019 · 1 comment
Assignees
Labels
FREQUENCY: level 2 TYPE: bug The described behavior is considered as wrong (bug).

Comments

@AndreyBelym
Copy link
Contributor

What is your Test Scenario?

Continue testing after browsers do not respond in concurrency mode.

What is the Current behavior?

When a number of concurrent browsers restart simultaneously, some of them can't reconnect to TestCafe due to ERR_CACHE_READ_FAILURE for TestCafe resources.

What is the Expected behavior?

TestCafe continues the test session after restarting browsers,

What is your web application and your TestCafe test code?

NOTE: I've disabled the browser heartbeat and decreased the disconnection timeout down to 10 seconds.

Your complete test code (or attach your test files):
 fixture`1`.page`example.com`;

test(`1`, async t => {
    await t.wait(30000);
});

test(`2`, async t => {
    await t.wait(30000);
});

test(`3`, async t => {
    await t.wait(30000);
});
Your complete configuration file (if any):

Your complete test report:
 - Chrome 78.0.3904.108 / Windows 10

 1
ERROR The Chrome 78.0.3904.108 / Windows 10 browser disconnected. This problem may appear when a browser hangs or is closed, or due to network issues.
Screenshots:

Steps to Reproduce:

  1. Go to my website ...
  2. Execute this command...
  3. See the error...

Your Environment details:

  • testcafe version: 1.7.0
  • node.js version: 10.15.0
  • command-line arguments: testcafe chrome -c 3 test.js
  • browser name and version:
  • platform and version:
  • other:
@miherlosev miherlosev added FREQUENCY: level 1 TYPE: bug The described behavior is considered as wrong (bug). labels Dec 13, 2019
@AlexKamaev
Copy link
Contributor

For the team:
I tried to reproduce the issue in the latest version and the issue still exists.

To reproduce it, modify the browser-connection-timeouts.js file as follows:

export const HEARTBEAT_TIMEOUT       = 10000;
export const BROWSER_RESTART_TIMEOUT = 60 * 1000;
export const BROWSER_CLOSE_TIMEOUT   = BROWSER_RESTART_TIMEOUT / 2;

export const LOCAL_BROWSER_INIT_TIMEOUT  = 2 * 60 * 1000;
export const REMOTE_BROWSER_INIT_TIMEOUT = 6 * 60 * 1000;

export const HEARTBEAT_INTERVAL = 2 * 1000000;

export const CHECK_IFRAME_DRIVER_LINK_DELAY       = 500;
export const CHECK_CHILD_WINDOW_DRIVER_LINK_DELAY = 500;
export const SEND_STATUS_REQUEST_TIME_LIMIT       = 5000;
export const SEND_STATUS_REQUEST_RETRY_DELAY      = 300;
export const SEND_STATUS_REQUEST_RETRY_COUNT      = Math.floor(2 * 60 * 1000 / SEND_STATUS_REQUEST_RETRY_DELAY - 1);
export const CHECK_STATUS_RETRY_DELAY             = 1000;

Also, you need to comment out the following line in the driver.js file:

browser.startHeartbeat(this.heartbeatUrl, hammerhead.createNativeXHR);

I have the following result after one of the browsers is restarted:
image

I tried to run TestCafe with the --disable-page-caching option. It does not help. However, if I run Chrome with the --disk-cache-size=1 flag, it works as expected all the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FREQUENCY: level 2 TYPE: bug The described behavior is considered as wrong (bug).
Projects
None yet
Development

No branches or pull requests

3 participants