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

Test Flake: A Jasmine spec timed out. Resetting the WebDriver Control Flow. #2200

Closed
spadgett opened this issue Oct 2, 2017 · 27 comments
Closed
Assignees
Labels
kind/test-flake Categorizes issue or PR as related to test flakes. priority/P2

Comments

@spadgett
Copy link
Member

spadgett commented Oct 2, 2017

Running "protractor:default" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://172.18.14.245:57776/wd/hub
Spec started
visiting url: create-project
visiting url: project/console-test-project-1506967814825/create
visiting url: project/console-test-project-1506967814825/browse/images
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
Protractor.get(https://localhost:9000/dev-console/project/console-test-project-1506967814825/browse/images) - reset url
@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

@spadgett spadgett added kind/test-flake Categorizes issue or PR as related to test flakes. priority/P1 labels Oct 2, 2017
@spadgett spadgett self-assigned this Oct 2, 2017
@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Screenshot is just a loading screen:

user adds a template to a project after creating a new project using the import yaml tab should process and create the objects in the template 6

cc @benjaminapetersen

@benjaminapetersen benjaminapetersen self-assigned this Oct 2, 2017
@benjaminapetersen
Copy link
Contributor

Yeah I think in all this e2e stuff the dependencies aren't nailed down as well as we would like. Selenium or webdriver versions seems to suddenly change and things get funny. :/

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Selenium or webdriver versions seems to suddenly change and things get funny.

We probably should commit package-lock.json to avoid this stuff.

@benjaminapetersen
Copy link
Contributor

Re: #2083

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Might be unrelated, but Firefox recently changed from

52.3.0-2.el7_4 -> 52.4.0-1.el7_4

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

https://ci.openshift.redhat.com/jenkins/job/merge_pull_request_origin_web_console/304/
https://ci.openshift.redhat.com/jenkins/job/test_pull_request_origin_web_console/244/

It's failing on Protractor.get, but not every time. I wonder if we just need to bump the timeout.

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Timeout is only 3s. I can see the page taking longer than that to load. Since the tests take 20-30 minutes to run in Jenkins, we might want to bump this to something much higher.

Error: Wait timed out after 3050ms

@benjaminapetersen
Copy link
Contributor

I think its in here:

Spec started
visiting url: create-project
visiting url: project/console-test-project-1506965913119/create
visiting url: project/console-test-project-1506965913119/browse/images
A Jasmine spec timed out. Resetting the WebDriver Control Flow.
The last active task was: 
Protractor.get(https://localhost:9000/dev-console/project/console-test-project-1506965913119/browse/images) - reset url

Tinkering locally, for some reason the click on "create" is no longer happening before the browser navigates to the next page (images). So it never actually creates the resources, thus the tables are empty.

Thats the issue I've been working on the past 2 days locally, now its showing up in Travis.

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

getPageTimeout is set to 30s, so why is it timing out after 3s?

https://github.com/openshift/origin-web-console/blob/master/test/protractor.conf.js#L180

@benjaminapetersen
Copy link
Contributor

I think its not waiting for anything, its just plowing through the rest of the tests and failing. The A Jasmine spec timed out. Resetting the WebDriver Control Flow. doesn't quite seem to be truthful...

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Well we have waitForUri, but that's supposed to wait 5s. So where is 3s coming from?

exports.goToPage = function(uri) {
return browser.get(uri).then(() => {
return waitForUri(uri);
});
};

var waitForUri = function(expectedUri) {
let actualUrl;
return browser.wait(() => {
return browser.getCurrentUrl().then((url) => {
actualUrl = url;
return actualUrl.indexOf(expectedUri) > -1;
});
}, 5000, "URL hasn't changed to " + expectedUri + '(is currently: ' + actualUrl + ')');
};
exports.waitForUri = waitForUri;

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

Testing an increase in the waitForUri timeout: #2203

@benjaminapetersen
Copy link
Contributor

Nice, tinkering as well.

@benjaminapetersen
Copy link
Contributor

My theory, I think its deeper. I don't believe it is timing out in the navigation, I think its timing out waiting for elements to be rendered to the page. Since protractor is in sync w/Angular, it knowns when Angular is done (all promises resolved) for requesting the objects that never get created. So it is rendering empty tables, then the element(by.cssContainingText()) never resolve to anything.

However, your links above consistently timeout at 3050, so thats weird.

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

@benjaminapetersen I don't think you're wrong, but I think you're describing a different flake (#1685). This particular error consistently shows the white "Loading..." page in failure screenshots like discovery hasn't finished. I think it's just slow and timing out too soon.

I wonder if our pre-Angular bootstrap tasks are tripping Protractor up.

@spadgett
Copy link
Member Author

spadgett commented Oct 2, 2017

@benjaminapetersen
Copy link
Contributor

Oh that might be. I've read about custom bootstrapping causing problems. Will see if I can dig up the reference.

@spadgett spadgett changed the title Test Flake:A Jasmine spec timed out. Resetting the WebDriver Control Flow. Test Flake (Firefox 52.4.0): A Jasmine spec timed out. Resetting the WebDriver Control Flow. Oct 3, 2017
@spadgett
Copy link
Member Author

spadgett commented Oct 3, 2017

I'm pretty sure this was caused by the Firefox 52.3.0 -> 52.4.0 bump. Both the test and merge queues stopped working as soon as the installed Firefox package was updated. 52.4.0 is the latest ESR released a few days ago.

@spadgett
Copy link
Member Author

spadgett commented Oct 4, 2017

Opened openshift-eng/aos-cd-jobs#704 to temporarily downgrade Firefox as a workaround

@benjaminapetersen
Copy link
Contributor

Jenkins w/Firefox:

screen shot 2017-10-04 at 9 14 30 am

@spadgett
Copy link
Member Author

spadgett commented Oct 4, 2017

Downgrading FF did not fix the tests :(

@spadgett spadgett changed the title Test Flake (Firefox 52.4.0): A Jasmine spec timed out. Resetting the WebDriver Control Flow. Test Flake: A Jasmine spec timed out. Resetting the WebDriver Control Flow. Oct 6, 2017
@spadgett
Copy link
Member Author

spadgett commented Oct 6, 2017

Lowering severity as the tests are no longer flaking.

@spadgett
Copy link
Member Author

This failure is no longer happening.

@ambicamahapatro
Copy link

Getting the error Jasmine spec timed out. Resetting the WebDriver Control Flow while executing the test suit but individually it runs fine. tried changing the protractor config defaultTimeoutInterval and changing the Jasmine framework to Jasmine from jasmine2. Still nothing works. can somebody plz help me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/test-flake Categorizes issue or PR as related to test flakes. priority/P2
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants