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

Mocha 4.0.x: Test process never finishes #368

Closed
skv-headless opened this issue Oct 25, 2017 · 6 comments
Closed

Mocha 4.0.x: Test process never finishes #368

skv-headless opened this issue Oct 25, 2017 · 6 comments

Comments

@skv-headless
Copy link

skv-headless commented Oct 25, 2017

Description

detox test never ends. Don't have this issue in example.

Steps to Reproduce

just created react native project https://github.com/skv-headless/TestDetox

Detox, Node, Device, Xcode and macOS Versions

  • Detox: 5.9.2
  • Node: v8.1.4
  • Device: iOS simulator
  • Xcode: 9.0.1
  • macOS: 10.12.6

Device and verbose Detox logs

2017-10-25 11:34:01.569 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Received: invoke 2017-10-25 11:34:01.931 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Sent: invokeResult 2017-10-25 11:34:01.942 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Received: reactNativeReload 2017-10-25 11:34:01.945 TestDetox[71325:928047] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.AccessibilityManagerQueue> 2017-10-25 11:34:01.945 TestDetox[71325:928047] ☣️ Adding idling resource for queue: <OS_dispatch_queue: com.facebook.react.PlatformConstantsQueue> 2017-10-25 11:34:02.037 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Sent: ready 2017-10-25 11:34:02.050 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Received: invoke 2017-10-25 11:34:02.151 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Sent: invokeResult 2017-10-25 11:34:02.159 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Received: cleanup 2017-10-25 11:34:02.159 TestDetox[71325:928047] ☣️ DETOX:: Detox Action Sent: cleanupDone

@skv-headless
Copy link
Author

skv-headless commented Oct 25, 2017

screen shot 2017-10-25 at 12 42 56

And it holds in this state forever.

I would love to provide more details or fix it myself. But it is hard due to compiled code (maybe you have some tip how to debug it)

@rotemmiz
Copy link
Member

I saw this behaviour with Mocha 4.0.0, which I saw that it is indeed what you use.
Until we figure out what broke , use mocha 3.5.x.

I will take the liberty to change the issue name to reflect the issue with mocha 4

@DanielMSchmidt
Copy link
Contributor

Do you have --exit in the mocha.opts? it helped for me

@rotemmiz rotemmiz changed the title test process never finishes Mocha 4.0.x: Test process never finishes Oct 26, 2017
@skv-headless
Copy link
Author

skv-headless commented Oct 31, 2017

@rotemmiz works like a charm. Thank you. Shall I leave this issue open in order to fix mocha 4.x compatibility?

@ferrannp
Copy link

ferrannp commented Nov 2, 2017

Mocha now behaves (in this case) just like Jest, so this issue is also affecting Jest. This probably indicates a bug in Detox code. For now, we need to run Jest with forceExit: true.

@rotemmiz
Copy link
Member

Proposed fix is pushed to master, will be out next version.

rotemmiz added a commit that referenced this issue Nov 12, 2017
… up Detox server by closing ws socket. :P
@wix wix locked and limited conversation to collaborators Jul 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

6 participants