yarnpkg / yarn

The 1.x line is frozen - features and bugfixes now happen on https://github.com/yarnpkg/berry
https://classic.yarnpkg.com
Other
41.4k stars 2.72k forks source link

local test fails #822

Closed WYSIATI closed 7 years ago

WYSIATI commented 7 years ago

[BUG]

I ran npm run test on my mac twice, but failed at same tests. I am not sure if this is normal or only seen by me or any one out there came across similar issues before, so would like to post it here.

My environment: os: mac os 10.12 node: v4.2.1 npm: 2.14.7 yarn: v0.15.1 git: 2.6.1

The test output is followed:

`> yarn@0.15.1 test /Users/chesterlee/Developer/yarn

npm run lint && npm run test-only

yarn@0.15.1 lint /Users/chesterlee/Developer/yarn eslint . && flow check

Found 0 errors

yarn@0.15.1 test-only /Users/chesterlee/Developer/yarn jest --coverage --verbose

FAIL tests/fetchers.js (8.676s) ● GitFetcher.fetch

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  at Timer.listOnTimeout (timers.js:92:15)

✓ BaseFetcher.fetch (617ms) ✓ CopyFetcher.fetch (189ms) ✕ GitFetcher.fetch (5011ms) ✓ TarballFetcher.fetch (962ms) ✓ TarballFetcher.fetch throws (150ms) ✓ TarballFetcher.fetch supports local ungzipped tarball (47ms)

RUNS tests/commands/add.js RUNS tests/commands/install.js RUNS tests/package-resolver.js

Test Suites: 1 failed, 1 skipped, 1 of 20 total Tests: 1 failed, 2 skipped, 5 passed, 8 total Snapshots: 1 passed, 1 total Time: 85s, estimated 113s console.error node_modules/core-js/library/modules/es6.promise.js:117 FAIL tests/package-resolver.js (102.56s)and failed. ● resolve https://github.com/npm-ml/ocaml.git#npm-4.02.3

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  at Timer.listOnTimeout (timers.js:92:15)

● resolve gist:d59975ac23e26ad4e25b

Command failed.
Exit code: 128
Command: git
Arguments: clone https://gist.github.com/d59975ac23e26ad4e25b.git /var/folders/l1/rppgq6hx7xg_shrk59wkbg4m0000gn/T/d-116912-64359-1jukryi/851ce7b003f6b923b8eb7d61e28a4636
Directory: /Users/chesterlee/Developer/yarn
Output:
Cloning into '/var/folders/l1/rppgq6hx7xg_shrk59wkbg4m0000gn/T/d-116912-64359-1jukryi/851ce7b003f6b923b8eb7d61e28a4636'...
fatal: unable to access 'https://gist.github.com/d59975ac23e26ad4e25b.git/': Failed to connect to gist.github.com port 443: Operation timed out

  at SpawnError (src/errors.js:14:1)
  at ChildProcess.<anonymous> (src/util/child.js:79:17)
  at emitTwo (events.js:87:13)
  at ChildProcess.emit (events.js:172:7)
  at maybeClose (internal/child_process.js:818:16)
  at Socket.<anonymous> (internal/child_process.js:319:11)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at Pipe._onclose (net.js:469:12)

✓ resolve github:PolymerElements/paper-elements (42169ms) ✓ resolve https://github.com/PolymerElements/font-roboto.git (1ms) ✓ resolve https://github.com/npm-ml/re ✓ resolve https://bitbucket.org/hgarcia/node-bitbucket-api.git (1ms) ✓ resolve https://github.com/PolymerElements/font-roboto/archive/2fd5c7bd715a24fb5b250298a140a3ba1b71fe46.tar.gz ✕ resolve https://github.com/npm-ml/ocaml.git#npm-4.02.3 (60121ms) ✓ resolve gitlab:leanlabsio/kanban (1ms) ✕ resolve gist:d59975ac23e26ad4e25b (3ms) ✓ resolve bitbucket:hgarcia/node-bitbucket-api ✓ resolve scrollin ✓ resolve gulp ✓ resolve react-native (1ms) ✓ resolve ember-cli ✓ resolve npm:gulp (1ms) ✓ resolve @polymer/iron-icon

PASS tests/reporters/json-reporter.js ✓ JSONReporter.step (22ms) ✓ JSONReporter.footer (4ms) ✓ JSONReporter.log (2ms) ✓ JSONReporter.command (2ms) ✓ JSONReporter.success (2ms) ✓ JSONReporter.error (3ms) ✓ JSONReporter.warn (9ms) ✓ JSONReporter.info (8ms) ✓ JSONReporter.activity (32ms) ✓ JSONReporter.progress (4ms)

PASS tests/normalize-manifest.js ✓ author object normalize (280ms) ✓ author string (35ms) ✓ authors file to contributors (35ms) ✓ bin string (147ms) ✓ binding.gyp scripts.install (58ms) ✓ bugs string (99ms) ✓ bundledDependencies alias (87ms) ✓ clean version (30ms) ✓ contributors array expand (31ms) ✓ dedupe dependencies (82ms) ✓ dedupe dependencies root (70ms) ✓ dedupe optionalDependencies (42ms) ✓ dedupe optionalDependencies root (32ms) ✓ engines array (74ms) ✓ explode directories.bin (41ms) ✓ explode directories.man (43ms) ✓ extract description (75ms) ✓ homepage string (30ms) ✓ hosted git repository url (57ms) ✓ keywords string (55ms) ✓ maintainers array expand (24ms) ✓ man string (27ms) ✓ name (24ms) ✓ readme (44ms) ✓ repository string (27ms) ✓ server scripts.start (37ms) ✓ throw name blacklist (27ms) ✓ throw name illegal character (27ms) ✓ throw name non-string (27ms) ✓ throw name start dot (42ms) ✓ throw name url encode required (45ms) ✓ valid license (61ms) ✓ version (27ms) ✓ warn builtin module collision (29ms) ✓ warn empty string invalid license (26ms) ✓ warn invalid license (33ms) ✓ warn typo (31ms) ✓ util.stringifyPerson (5ms) ✓ util.parsePerson (2ms) ✓ util.extractDescription (6ms)

PASS tests/util/promise.js ✓ promisify (52ms) ✓ promisifyObject (8ms) ✓ queue (5ms)

PASS tests/reporters/console.js ✓ ConsoleReporter.step (34ms) ✓ ConsoleReporter.header (7ms) ✓ ConsoleReporter.footer (16ms) ✓ ConsoleReporter.log (9ms) ✓ ConsoleReporter.success (12ms) ✓ ConsoleReporter.error (6ms) ✓ ConsoleReporter.info (6ms) ✓ ConsoleReporter.command (6ms) ✓ ConsoleReporter.warn (11ms) ✓ ConsoleReporter.activity (23ms) ✓ ConsoleReporter.select (27ms) ✓ ConsoleReporter.progress (20ms) ✓ ProgressBar (5ms) ✓ Spinner (7ms)

PASS tests/util/filter.js ✓ ignoreLinesToRegex (41ms)

PASS tests/reporters/buffer-reporter.js ✓ BufferReporter.finished (17ms) ✓ BufferReporter.step (8ms) ✓ BufferReporter.log (4ms) ✓ BufferReporter.success (3ms) ✓ BufferReporter.error (15ms) ✓ BufferReporter.info (5ms) ✓ BufferReporter.command (5ms) ✓ BufferReporter.warn (3ms)

PASS tests/reporters/console-reporter.js ✓ ConsoleReporter.step (17ms) ✓ ConsoleReporter.header (4ms) ✓ ConsoleReporter.footer (6ms) ✓ ConsoleReporter.log (18ms) ✓ ConsoleReporter.success (7ms) ✓ ConsoleReporter.error (2ms) ✓ ConsoleReporter.info (2ms) ✓ ConsoleReporter.command (2ms) ✓ ConsoleReporter.warn (3ms) ✓ ConsoleReporter.activity (6ms) ✓ ConsoleReporter.select (8ms) ✓ ConsoleReporter.progress (26ms) ✓ ProgressBar (4ms) ✓ Spinner (6ms)

PASS tests/reporters/event-reporter.js ✓ EventReporter.finished (11ms) ✓ EventReporter.step (3ms) ✓ EventReporter.log (4ms) ✓ EventReporter.success (5ms) ✓ EventReporter.error (2ms) ✓ EventReporter.info (4ms) ✓ EventReporter.command (4ms) ✓ EventReporter.warn (4ms)

PASS tests/lockfile.js ✓ parse/stringify 1 (88ms) ✓ parse/stringify 2 (3ms) ✓ parse/stringify 3 (5ms) ✓ parse/stringify 4 (3ms) ✓ parse (12ms) ✓ stringify (2ms) ✓ Lockfile.fromDirectory (1ms) ✓ Lockfile.getLocked (22ms) ✓ Lockfile.getLocked pointer (2ms) ✓ Lockfile.getLocked no cache (2ms) ✓ Lockfile.getLocked defaults (5ms) ✓ Lockfile.getLocked unknown ✓ Lockfile.getLockfile (4ms) ✓ Lockfile.getLockfile (sorting) (2ms)

PASS tests/reporters/base-reporter.js ✓ BaseReporter.getTotalTime (20ms) ✓ BaseReporter.step (3ms) ✓ BaseReporter.error (2ms) ✓ BaseReporter.warn (1ms) ✓ BaseReporter.info (3ms) ✓ BaseReporter.success (2ms) ✓ BaseReporter.log (3ms) ✓ BaseReporter.info ✓ BaseReporter.command (1ms) ✓ BaseReporter.header ✓ BaseReporter.footer (2ms) ✓ BaseReporter.activity (1ms) ✓ BaseReporter.question (6ms) ✓ BaseReporter.select (3ms) ✓ BaseReporter.progress (1ms)

PASS tests/util/stream.js ✓ ConcatStream (26ms)

PASS tests/util/blocking-queue.js ✓ max concurrency (14ms)

PASS tests/package-compatibility.js ✓ node semver semantics (125ms)

PASS tests/util/git.js ✓ cleanUrl (116ms)

PASS tests/constants.js ✓ getPathKey (16ms)

FAIL tests/commands/add.js (131.378s) ● install with arg that has install scripts

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  at Timer.listOnTimeout (timers.js:92:15)

● add with new dependency should be deterministic 3

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  at Timer.listOnTimeout (timers.js:92:15)

✕ install with arg that has install scripts (60020ms) ✓ install with arg (2ms) ✓ install with arg that has binaries (5847ms) ✓ add should ignore cache ✓ add should not make package.json strict ✓ add --save-exact should not make all package.json strict (1ms) ✕ add with new dependency should be deterministic 3 (60499ms) ✓ install --initMirror should add init mirror deps from package.json (1ms) ✓ add with new dependency should be deterministic ○ add with new dependency should be deterministic 2 ✓ add with offline mirror ✓ install with --save and without offline mirror (1ms) ✓ upgrade scenario ✓ upgrade scenario 2 (with sub dependencies) ✓ downgrade scenario ✓ modules resolved multiple times should save to mirror correctly (2998ms) ✓ add should put a git dependency to mirror

FAIL tests/commands/install.js (158.161s) ● install transitive optional dependency from lockfile

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.

  at Timer.listOnTimeout (timers.js:92:15)

✓ integrity hash respects flat and production flags (1955ms) ✓ flat arg is inherited from root manifest (248ms) ✓ doesn't write new lockfile if existing one satisfied (32507ms) ✓ writes new lockfile if existing one isn't satisfied (774ms) ✕ install transitive optional dependency from lockfile (60103ms) ✓ root install from shrinkwrap (3ms) ✓ root install with optional deps (21472ms) ✓ install file: protocol ✓ install renamed packages ✓ install from offline mirror (1ms) ✓ install from git cache ✓ install should dedupe dependencies avoiding conflicts 0 ✓ install should dedupe dependencies avoiding conflicts 1 ✓ install should dedupe dependencies avoiding conflicts 2 ✓ install should dedupe dependencies avoiding conflicts 3 ✓ install should dedupe dependencies avoiding conflicts 4 ✓ install should dedupe dependencies avoiding conflicts 5 ✓ install should dedupe dependencies avoiding conflicts 6 (jest/jest-runtime case) ✓ install should dedupe dependencies avoiding conflicts 7 ✓ install should dedupe dependencies avoiding conflicts 8 (40852ms) ✓ install should dedupe dependencies avoiding conflicts 9 (1ms) ✓ install have a clean node_modules after lockfile update (branch switch scenario) (1ms) ✓ install have a clean node_modules after lockfile update (branch switch scenario 2) ✓ uninstall should remove dependency from package.json, yarn.lock and node_modules ✓ uninstall should remove subdependencies ✓ check should verify that top level dependencies are installed correctly (1ms) ✓ install should run install scripts in the order of dependencies ✓ run install scripts in the order when one dependency does not have install script (1ms) ✓ install should circumvent circular dependencies ✓ install should resolve circular dependencies 2 ✓ install should add missing deps to yarn and mirror (PR import scenario) ○ install should update a dependency to yarn and mirror (PR import scenario 2) ✓ install cache symlinks properly

--------------------------------- ---------- ---------- ---------- ---------- ---------------- File % Stmts % Branch % Funcs % Lines Uncovered Lines
All files 76.17 64.49 83.43 80.91
src 84.1 68.9 90.09 87.23
config.js 87.72 71.67 93.33 93.2 ... 259,330,339
constants.js 97.06 62.5 100 100
errors.js 100 100 100 100
package-compatibility.js 63.95 53.03 64.29 72.13 ... 164,167,173
package-constraint-resolver.js 100 100 100 100
package-fetcher.js 75.86 59.09 100 84.09 ... 60,68,70,72
package-hoister.js 97.65 90.32 100 97.55 68,228,365,366
package-install-scripts.js 89.54 72.83 100 93.53 ... 145,149,168
package-linker.js 87.14 64.58 100 90.43 ... 219,247,250
package-reference.js 85.51 76.92 66.67 87.88 ... 104,106,118
package-request.js 90.32 70 93.1 95.45 ... 211,232,296
package-resolver.js 62.91 62.71 74.19 62.67 ... 312,333,338
src/cli/commands 71.03 58.91 78.81 76.95
_execute-lifecycle-script.js 68.42 58.33 60 62.5 17,18,19
add.js 70.59 59.68 77.27 72.73 ... 177,178,195
check.js 77.57 63.64 93.33 80.72 ... 167,171,180
install.js 62.38 52.36 75.95 56.25 ... 765,766,767
ls.js 92.42 80 77.78 91.11 91,92,94,95
remove.js 83.33 69.57 93.75 94.12 25,64
src/fetchers 76.4 68.02 95.16 89.47
base-fetcher.js 74.07 66.67 100 100
copy-fetcher.js 53.33 66.67 100 100
git-fetcher.js 77.78 66.67 87.5 88.37 32,53,59,60,63
index.js 100 83.33 100 100
tarball-fetcher.js 79.49 68.42 95.65 86.36 ... 120,124,126
src/lockfile 86.15 82.09 85.37 98.33
parse.js 84.91 76.09 71.43 100
stringify.js 94.87 89.36 100 100
wrapper.js 83.87 85.48 90 97.5 150
src/registries 67.53 58.06 73.68 78.45
base-registry.js 82.76 90 61.54 82.14 60,68,72,76,80
bower-registry.js 61.9 59.09 100 90.91 29
index.js 100 90 100 100
npm-registry.js 71.43 58.33 83.33 78 ... ,73,116,117
yarn-registry.js 47.22 38.24 53.33 65.22 ... 78,79,83,91
src/reporters 62.86 55.56 68.48 68.1
base-reporter.js 51.67 42.55 72.09 58.33 ... 193,194,200
buffer-reporter.js 100 83.33 100 100
event-reporter.js 100 83.33 100 100
format.js 66.67 100 0 66.67 4
index.js 62.5 40 40 100
json-reporter.js 66.67 91.67 65.52 65.96 ... 86,89,95,98
src/reporters/console 64.98 58.62 73.97 66.2
console-reporter.js 56.97 56.16 69.64 57.5 ... 354,355,356
progress-bar.js 100 75 100 100
spinner-progress.js 91.67 83.33 75 95.65 60
util.js 56.52 50 100 55.56 35,36,37,38
src/reporters/lang 100 83.33 100 100
en.js 100 100 100 100
index.js 100 83.33 100 100
src/resolvers 96.3 88.89 94.12 94.44
base-resolver.js 91.67 100 66.67 91.67 40
index.js 100 88.89 100 100
src/resolvers/exotics 71.63 59.45 88.24 79.36
bitbucket-resolver.js 100 83.33 100 100
exotic-resolver.js 83.33 75 100 83.33 13
file-resolver.js 71.43 61.54 90 94.44 29
gist-resolver.js 60 62.5 88.89 90.91 22
git-resolver.js 65.28 51.52 83.33 73.81 ... 130,131,135
github-resolver.js 100 90 100 100
gitlab-resolver.js 100 83.33 100 100
hosted-git-resolver.js 66.25 41.07 76 64.47 ... 188,189,193
registry-resolver.js 90 66.67 80 90 17
tarball-resolver.js 76.74 75 100 90.63 29,40,50
src/resolvers/registries 48.94 47.92 74.19 52.44
bower-resolver.js 88.89 71.43 87.5 87.5 25
npm-resolver.js 38.96 37.14 61.11 42.42 ... 124,132,145
registry-resolver.js 100 83.33 100 100
yarn-resolver.js 100 83.33 100 100
src/util 74.47 59.49 83.91 78.67
blocking-queue.js 92.98 78.13 100 92.98 52,53,84,85
child.js 76.47 69.57 92.86 86.11 34,35,37,44,61
crypto.js 92.31 0 80 90.91 37
execute-lifecycle-script.js 82.46 71.05 100 92.11 60,68,74
filter.js 30.91 31.43 60 61.11 ... 110,111,136
fs.js 86.15 62.96 94.74 100
git.js 66.92 52.29 76.47 68.64 ... 263,275,329
map.js 100 100 100 100
misc.js 100 83.33 100 100
network.js 77.78 50 100 73.33 17,18,20,38
promise.js 94.87 100 81.82 100
request-manager.js 62.84 50.44 68 65.22 ... 369,370,371
stream.js 97.37 100 87.5 100
version.js 100 100 100 100
src/util/normalize-manifest 92.25 84.04 100 98.46
fix.js 66.67 50 100 100
index.js 100 75 100 100
infer-license.js 100 83.33 100 100
licenses.js 100 100 100 100
typos.js 100 100 100 100
util.js 100 100 100 100
validate.js 91.89 80 100 95 118
--------------------------------- ---------- ---------- ---------- ---------- ----------------

Test Suites: 4 failed, 1 skipped, 15 passed, 19 of 20 total Tests: 6 failed, 4 skipped, 195 passed, 205 total Snapshots: 57 passed, 57 total Time: 172.255s Ran all test suites.

npm ERR! Darwin 16.0.0 npm ERR! argv "/usr/local/Cellar/node/4.2.1/bin/node" "/usr/local/bin/npm" "run" "test-only" npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! yarn@0.15.1 test-only: jest --coverage --verbose npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yarn@0.15.1 test-only script 'jest --coverage --verbose'. npm ERR! This is most likely a problem with the yarn package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! jest --coverage --verbose npm ERR! You can get their info via: npm ERR! npm owner ls yarn npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/chesterlee/Developer/yarn/npm-debug.log

npm ERR! Darwin 16.0.0 npm ERR! argv "/usr/local/Cellar/node/4.2.1/bin/node" "/usr/local/bin/npm" "run" "test" npm ERR! node v4.2.1 npm ERR! npm v2.14.7 npm ERR! code ELIFECYCLE npm ERR! yarn@0.15.1 test: npm run lint && npm run test-only npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the yarn@0.15.1 test script 'npm run lint && npm run test-only'. npm ERR! This is most likely a problem with the yarn package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! npm run lint && npm run test-only npm ERR! You can get their info via: npm ERR! npm owner ls yarn npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /Users/chesterlee/Developer/yarn/npm-debug.log`

AlicanC commented 7 years ago

Tests have trouble passing at the moment. Owners are aware.

sebmck commented 7 years ago

master is now stable and green across all our CI so this should be fixed. Feel free to join us on the #development channel on our discord chat if you'd like anymore help!