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

Unit tests are failing on gulp.once #44

Closed
rkavalap opened this issue Sep 12, 2016 · 5 comments
Closed

Unit tests are failing on gulp.once #44

rkavalap opened this issue Sep 12, 2016 · 5 comments

Comments

@rkavalap
Copy link
Contributor

rkavalap commented Sep 12, 2016

This is a tracking bug for unit test failures.

MacBook-Pro-2:appium-chromedriver rkavalap$ gulp once
[16:30:04] Using gulpfile ~/work/appium-chromedriver/gulpfile.js
[16:30:04] Starting 'once'...
[16:30:04] Starting 'clean'...
[16:30:04] Finished 'clean' after 23 ms
[16:30:04] Starting 'jshint'...
[16:30:05] Finished 'jshint' after 200 ms
[16:30:05] Starting 'lint'...
[16:30:05] Finished 'lint' after 3.75 μs
[16:30:05] Starting 'transpile'...
[16:30:05] Finished 'transpile' after 918 ms
[16:30:05] Starting 'unit-test'...
 13  -_-_-_-_-_-_-_-_-__,------,
 3   -_-_-_-_-_-_-_-_-__|  /\_/\
 1   -_-_-_-_-_-_-_-_-_~|_( x .x)
     -_-_-_-_-_-_-_-_-_ ""  ""

  13 passing (2m)
  1 pending
  3 failing

  1) chromedriver with EventEmitter should stop a session:
     Error: timeout of 120000ms exceeded. Ensure the done() callback is being called in this test.


  2) chromedriver with async/await should stop a session:

      AssertionError: expected 'stopping' to deeply equal 'stopped'
      + expected - actual

      -stopping
      +stopped

      at Suite.callee$1$0$ (test/chromedriver-specs.js:181:21)
      at tryCatch (node_modules/babel-runtime/regenerator/runtime.js:67:40)
      at GeneratorFunctionPrototype.invoke [as _invoke] (node_modules/babel-runtime/regenerator/runtime.js:315:22)
      at GeneratorFunctionPrototype.prototype.(anonymous function) [as next] (node_modules/babel-runtime/regenerator/runtime.js:100:21)
      at GeneratorFunctionPrototype.invoke (node_modules/babel-runtime/regenerator/runtime.js:136:37)
      at bound (domain.js:280:14)
      at GeneratorFunctionPrototype.runBound (domain.js:293:12)

  3) chromedriver with async/await should throw an error during start if session does not work:
     AssertionError: expected promise to be rejected with an error including 'cannot parse capability' but it was fulfilled with undefined




[16:32:35] Error in plugin 'gulp-mocha'
Message:
    3 tests failed.
[16:32:35] 'unit-test' errored after 2.48 min
[16:32:35] Error in plugin 'gulp-mocha'
Message:
    3 tests failed.
[16:32:35] 'once' errored after 2.5 min
[16:32:35] Error in plugin 'run-sequence(unit-test)'
Message:
    3 tests failed.

> Stack:
>     at finish (/Users/rkavalap/work/appium-chromedriver/node_modules/run-sequence/index.js:56:13)
>     at Gulp.onError (/Users/rkavalap/work/appium-chromedriver/node_modules/run-sequence/index.js:67:4)
>     at emitOne (events.js:101:20)
>     at Gulp.emit (events.js:188:7)
>     at Gulp.Orchestrator._emitTaskDone (/Users/rkavalap/work/appium-chromedriver/node_modules/orchestrator/index.js:264:8)
>     at /Users/rkavalap/work/appium-chromedriver/node_modules/orchestrator/index.js:275:23
>     at finish (/Users/rkavalap/work/appium-chromedriver/node_modules/orchestrator/lib/runTask.js:21:8)
>     at Stream.<anonymous> (/Users/rkavalap/work/appium-chromedriver/node_modules/orchestrator/lib/runTask.js:52:4)
>     at Stream.f (/Users/rkavalap/work/appium-chromedriver/node_modules/end-of-stream/node_modules/once/once.js:17:25)
>     at emitOne (events.js:101:20)
>     at Stream.emit (events.js:188:7)
>     at /Users/rkavalap/work/appium-chromedriver/node_modules/gulp-mocha/index.js:60:12
>     at done (/Users/rkavalap/work/appium-chromedriver/node_modules/mocha/lib/mocha.js:498:13)
>     at Runner.<anonymous> (/Users/rkavalap/work/appium-chromedriver/node_modules/mocha/lib/runner.js:799:5)
>     at emitNone (events.js:91:20)
>     at Runner.emit (events.js:185:7)
@rkavalap
Copy link
Contributor Author

@jlipps, @imurchie I did some digging and I noticed few things -
travis.yml gets a latest chrome browser. But never maps the latest chromedriver within code.
chromedriver support also maps to chrome browser version.
https://chromium.googlesource.com/chromium/src/+/master/chrome/test/chromedriver/chrome/version.cc
If we need to keep the build green, we always need the 'LATEST' chromedriver.

@rkavalap
Copy link
Contributor Author

1st error's culprit when executing teen_process does not kill the process when it should.

dbug Chromedriver Changed state to 'stopping'
info JSONWP Proxy Proxying [DELETE /] to [DELETE http://127.0.0.1:9515/wd/hub/session/8d96edbf927faff819c63b52bb01c655] with no body
info JSONWP Proxy Got response with status 200: "{"sessionId":"8d96edbf9...
ERR! Chromedriver Error: Process didn't end after 10000ms
ERR! Chromedriver at Timeout._onTimeout (lib/teen_process.js:229:16)
ERR! Chromedriver at tryOnTimeout (timers.js:232:11)
ERR! Chromedriver at Timer.listOnTimeout (timers.js:202:5)
ERR! Chromedriver Error: Process didn't end after 10000ms
ERR! Chromedriver at Timeout._onTimeout (lib/teen_process.js:229:16)
ERR! Chromedriver at tryOnTimeout (timers.js:232:11)
ERR! Chromedriver at Timer.listOnTimeout (timers.js:202:5)
2) should stop a session
dbug Chromedriver Changed state to 'starting'

@rkavalap
Copy link
Contributor Author

rkavalap commented Sep 13, 2016

info Chromedriver [STDERR] [0913/080316:ERROR:mach_port_broker.mm(43)] bootstrap_look_up: Unknown service name (1102)

Ran chromedriver in verbose mode for PR.
https://travis-ci.org/appium/appium-chromedriver/builds/159518660

https://cs.chromium.org/search/?q=bootstrap_look_up&sq=package:chromium&type=cs

@rsesek can you throw your input for the above message thrown by chromedriver.

@jlipps
Copy link
Member

jlipps commented Sep 14, 2016

In that case we probably want to make sure travis is testing a specific version of chrome

@rkavalap
Copy link
Contributor Author

rkavalap commented Nov 4, 2016

Closing this bug since tests are passing now.

@rkavalap rkavalap closed this as completed Nov 4, 2016
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

No branches or pull requests

2 participants