Skip to content

Instantly share code, notes, and snippets.

@JuneKelly
Created February 21, 2018 10:04
Show Gist options
  • Save JuneKelly/c855445e16d8c8d197ffc17904f9baa5 to your computer and use it in GitHub Desktop.
Save JuneKelly/c855445e16d8c8d197ffc17904f9baa5 to your computer and use it in GitHub Desktop.
Local test failures relating to lock-manager
...
LockManager - checking the lock
1) should check if lock exists but not set or expire
2) should return true if the key does not exists
3) should return false if the key does exists
LockManager - releasing the lock
4) should put a all data into memory
LockManager - getting the lock
when the lock is not set
5) "before each" hook
when the lock is initially set
6) "before each" hook
when the lock times out
7) "before each" hook
LockManager - trying the lock
when the lock is not set
8) "before each" hook
when the lock is already set
9) "before each" hook
RateLimiter
when action is permitted
✓ should not produce and error
✓ should callback with true
when action is not permitted
✓ should not produce and error
✓ should callback with false
when limiter produces an error
✓ should produce and error
redirectToNewTemplate
redirect
✓ should perminant redirect if url matches redirect
✓ should not redirect on non matching url
✓ should ignore slash at end of url
RedisWrapper
client
✓ should use the feature settings if present
✓ should use the web settings if feature not present
2258 passing (39s)
9 failing
1) LockManager - checking the lock should check if lock exists but not set or expire:
TypeError: LockManager._checkLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/CheckingTheLock.js:48:26)
at Test.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at Runner.runTest (/app/node_modules/mocha/lib/runner.js:374:10)
at /app/node_modules/mocha/lib/runner.js:452:12
at next (/app/node_modules/mocha/lib/runner.js:299:14)
at /app/node_modules/mocha/lib/runner.js:309:7
at next (/app/node_modules/mocha/lib/runner.js:247:23)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
2) LockManager - checking the lock should return true if the key does not exists:
TypeError: LockManager._checkLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/CheckingTheLock.js:57:26)
at Test.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at Runner.runTest (/app/node_modules/mocha/lib/runner.js:374:10)
at /app/node_modules/mocha/lib/runner.js:452:12
at next (/app/node_modules/mocha/lib/runner.js:299:14)
at /app/node_modules/mocha/lib/runner.js:309:7
at next (/app/node_modules/mocha/lib/runner.js:247:23)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
3) LockManager - checking the lock should return false if the key does exists:
TypeError: LockManager._checkLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/CheckingTheLock.js:64:26)
at Test.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at Runner.runTest (/app/node_modules/mocha/lib/runner.js:374:10)
at /app/node_modules/mocha/lib/runner.js:452:12
at next (/app/node_modules/mocha/lib/runner.js:299:14)
at /app/node_modules/mocha/lib/runner.js:309:7
at next (/app/node_modules/mocha/lib/runner.js:247:23)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
4) LockManager - releasing the lock should put a all data into memory:
TypeError: LockManager._releaseLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/ReleasingTheLock.js:37:26)
at Test.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at Runner.runTest (/app/node_modules/mocha/lib/runner.js:374:10)
at /app/node_modules/mocha/lib/runner.js:452:12
at next (/app/node_modules/mocha/lib/runner.js:299:14)
at /app/node_modules/mocha/lib/runner.js:309:7
at next (/app/node_modules/mocha/lib/runner.js:247:23)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
5) LockManager - getting the lock when the lock is not set "before each" hook:
TypeError: this.LockManager._getLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/getLockTests.js:46:33)
at Hook.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at next (/app/node_modules/mocha/lib/runner.js:259:10)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
6) LockManager - getting the lock when the lock is initially set "before each" hook:
TypeError: this.LockManager._getLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/getLockTests.js:83:33)
at Hook.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at next (/app/node_modules/mocha/lib/runner.js:259:10)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
7) LockManager - getting the lock when the lock times out "before each" hook:
TypeError: this.LockManager._getLock is not a function
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/getLockTests.js:105:33)
at Hook.Runnable.run (/app/node_modules/mocha/lib/runnable.js:204:15)
at next (/app/node_modules/mocha/lib/runner.js:259:10)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
8) LockManager - trying the lock when the lock is not set "before each" hook:
TypeError: Cannot read property 'callsArgWith' of undefined
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/tryLockTests.js:48:17)
at Hook.Runnable.run (/app/node_modules/mocha/lib/runnable.js:221:32)
at next (/app/node_modules/mocha/lib/runner.js:259:10)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
9) LockManager - trying the lock when the lock is already set "before each" hook:
TypeError: Cannot read property 'callsArgWith' of undefined
at Context.<anonymous> (/app/test/unit/js/infrastructure/LockManager/tryLockTests.js:60:17)
at Hook.Runnable.run (/app/node_modules/mocha/lib/runnable.js:221:32)
at next (/app/node_modules/mocha/lib/runner.js:259:10)
at Immediate.<anonymous> (/app/node_modules/mocha/lib/runner.js:276:5)
at runCallback (timers.js:649:20)
at tryOnImmediate (timers.js:622:5)
at processImmediate [as _immediateCallback] (timers.js:594:5)
npm info lifecycle web-sharelatex@0.1.4~test:unit: Failed to exec test:unit script
npm ERR! Linux 4.15.3-300.fc27.x86_64
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "run" "test:unit"
npm ERR! node v6.9.5
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! web-sharelatex@0.1.4 test:unit: `npm -q run compile && bin/unit_test $@`
npm ERR! Exit status 9
npm ERR!
npm ERR! Failed at the web-sharelatex@0.1.4 test:unit script 'npm -q run compile && bin/unit_test $@'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the web-sharelatex package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! npm -q run compile && bin/unit_test $@
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs web-sharelatex
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls web-sharelatex
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /app/npm-debug.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment