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

does not identify server is up - probably missing other things too #20

Closed
GuyMograbi opened this issue Oct 10, 2015 · 0 comments · Fixed by #21
Closed

does not identify server is up - probably missing other things too #20

GuyMograbi opened this issue Oct 10, 2015 · 0 comments · Fixed by #21

Comments

@GuyMograbi
Copy link
Contributor

The code is wrong in data

Why?

simply because .on('data',func) does not promise you anything about the data you receive.

While you're looking for Selenium Server is up and running , you might never actually see it since it might split to 2 data events. one will say Selenium Server is and the other up and running..

it can split at any point...

you can clearly see it in the code

    function data(out) {
            grunt.verbose.writeln('>> '.red + out);
            var lines;

            if (REGEXP_REMOTE.test(out)) {
                server = extract(REGEXP_REMOTE, out, 1).replace(/\/wd\/hub/, '') || server;
            } else if (REGEXP_START_READY.test(out)) {
                // Success

what you need is to concatenate the outputs and look at the concatenation..

this might be handy: http://stackoverflow.com/a/20091680/1068746

GuyMograbi added a commit to GuyMograbi/grunt-protractor-webdriver that referenced this issue Oct 10, 2015
helps detecting events in output such as start.

fixes seckardt#20
seckardt added a commit that referenced this issue Oct 12, 2015
seckardt added a commit that referenced this issue Oct 12, 2015
seckardt added a commit that referenced this issue Oct 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant