Skip to content

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

Open

Description

@huan
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.

Activity

  1. hanguofeng commented on Jun 13, 2019

    @hanguofeng
    Contributor

    seems like #16

  2. hanguofeng commented on Jun 13, 2019

    @hanguofeng
    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)

  3. hanguofeng commented on Jun 13, 2019

    @hanguofeng
    Contributor

    note v10.16.0 changelog from node shows

    • upgrade to libuv 1.28.0 (cjihrig) #27241
  4. huan commented on Jun 14, 2019

    @huan
    OwnerAuthor

    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.

  5. added a commit that references this issue on Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions