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 failed under Mac OS with Node.js version: 10/11/12 #33

Open
huan opened this issue Jun 13, 2019 · 4 comments
Open

Unit tests failed under Mac OS with Node.js version: 10/11/12 #33

huan opened this issue Jun 13, 2019 · 4 comments
Labels

Comments

@huan
Copy link
Owner

huan commented Jun 13, 2019

not ok 37 should monitored file change event at least once
  ---
    operator: ok
    expected: true
    actual:   false
    at: Object.<anonymous> (/Users/travis/build/huan/hot-import/tests/fs-watch.spec.ts:221:5)
    stack: |-
      Error: should monitored file change event at least once

and more.

See: https://travis-ci.com/huan/hot-import/builds/115406390

@hanguofeng Please be aware that if you are using Mac OS. Linux will not be affected.

I'll make it publish first, then look in to it later.

@hanguofeng
Copy link
Contributor

seems like #16

@huan huan added the bug label Jun 13, 2019
@hanguofeng
Copy link
Contributor

seems like #16

not like.
reprduced on macos without docker but with nvm

node version v10.15.3 (npm v6.4.1) build pass
node version v10.16.0 (npm v6.9.0) build fail

test result are not stable , fail case count randomly from 3 to 5
and these following cases are fail:

not ok 9 should import module class with right id:2

operator: equal
expected: 2
actual: 1
at: Object. (/Users/hanguofeng/Code/hot-import/src/hot-import.spec.ts:92:9)

not ok 12 should get expected values from variable in module

operator: equal
expected: 'changed'
actual: 'original'
at: Object. (/Users/hanguofeng/Code/hot-import/src/hot-import.spec.ts:117:9)

not ok 30 should monitored file change event at least once

operator: ok
expected: true
actual: false
at: Object. (/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:91:5)

not ok 33 should monitored 1 change event

operator: equal
expected: 1
actual: 0
at: Object. (/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:158:5)

not ok 37 should monitored file change event at least once

operator: ok
expected: true
actual: false
at: Object. (/Users/hanguofeng/Code/hot-import/tests/fs-watch.spec.ts:221:5)

@hanguofeng
Copy link
Contributor

note v10.16.0 changelog from node shows

  • upgrade to libuv 1.28.0 (cjihrig) #27241

This was referenced Jun 14, 2019
@huan
Copy link
Owner Author

huan commented Jun 14, 2019

So according to your result, it seems that this issue related to the libuv 1.28.0 update?

I like to use setImmediate a lot because I believe the modification event should already be queued in the event loop, so the setImmediate will run after the event fired.

However, this is just my guess and it works without any problem under Linux, but the MacOS seems a different story now.

huan added a commit that referenced this issue Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants