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

Tests fails on Linux #35

Closed
sairus2k opened this issue Jun 25, 2017 · 1 comment
Closed

Tests fails on Linux #35

sairus2k opened this issue Jun 25, 2017 · 1 comment

Comments

@sairus2k
Copy link
Contributor

OS: Ubuntu 16.04 xenial x86_64
Kernel: 4.8.0-56-generic

I have cloned the repo, install packages and test.

$ yarn test
yarn test v0.24.5
$ jest --coverage && yarn run lint && yarn run spellcheck
PASS test/human-reporter.test.js
PASS test/base-server.test.js
PASS test/bunyan-reporter.test.js
FAIL test/server-client.test.js
● sends old actions by node ID

expect(received).toEqual(expected)

Expected value to equal:
  ["sync", 2, {"type": "FOO"}, {"id": [2, "server:uuid", 0], "time": 2}]
Received:
  ["sync", 2, {"type": "FOO"}, {"id": [2, "server:uuid", 0], "time": 2}, {"type": "FOO"}, {"id": [1, "server:uuid", 0], "time": 1}]

Difference:

- Expected
+ Received

@@ -10,6 +10,17 @@
       "server:uuid",
       0,
     ],
     "time": 2,
   },
+  Object {
+    "type": "FOO",
+  },
+  Object {
+    "id": Array [
+      1,
+      "server:uuid",
+      0,
+    ],
+    "time": 1,
+  },
 ]
  
  at client.sync.waitFor.then (test/server-client.test.js:463:31)
      at <anonymous>

● sends old actions by user

expect(received).toEqual(expected)

Expected value to equal:
  ["sync", 2, {"type": "FOO"}, {"id": [2, "server:uuid", 0], "time": 2}]
Received:
  ["sync", 2, {"type": "FOO"}, {"id": [2, "server:uuid", 0], "time": 2}, {"type": "FOO"}, {"id": [1, "server:uuid", 0], "time": 1}]                                                                                                                       

Difference:

- Expected
+ Received

@@ -10,6 +10,17 @@
       "server:uuid",
       0,
     ],
     "time": 2,
   },
+  Object {
+    "type": "FOO",
+  },
+  Object {
+    "id": Array [
+      1,
+      "server:uuid",
+      0,
+    ],
+    "time": 1,
+  },
 ]
  
  at client.sync.waitFor.then (test/server-client.test.js:505:31)
      at <anonymous>

PASS test/force-promise.test.js
PASS test/promisify.test.js
PASS test/index.test.js
FAIL test/filtered-sync.test.js (5.167s)
● does not sync actions on add

Timeout - Async callback was not invoked within timeout specified by jasmine.DEFAULT_TIMEOUT_INTERVAL.
  
  at pTimeout (node_modules/jest-jasmine2/build/queueRunner.js:53:21)
  at Timeout.callback [as _onTimeout] (node_modules/jsdom/lib/jsdom/browser/Window.js:523:19)
  at ontimeout (timers.js:488:11)
  at tryOnTimeout (timers.js:323:5)
  at Timer.listOnTimeout (timers.js:283:5)

● synchronizes only node-specific actions on connection

expect(received).toEqual(expected)

Expected value to equal:
  [{"type": "B"}]
Received:
  [{"type": "C"}, {"type": "B"}, {"type": "A"}]

Difference:

- Expected
+ Received

 Array [
   Object {
+    "type": "C",
+  },
+  Object {
     "type": "B",
   },
+  Object {
+    "type": "A",
+  },
 ]
  
  at Promise.all.then.then.then (test/filtered-sync.test.js:56:34)
      at <anonymous>

● synchronizes only user-specific actions on connection

expect(received).toEqual(expected)

Expected value to equal:
  [{"type": "B"}]
Received:
  [{"type": "C"}, {"type": "B"}, {"type": "A"}]

Difference:

- Expected
+ Received

 Array [
   Object {
+    "type": "C",
+  },
+  Object {
     "type": "B",
   },
+  Object {
+    "type": "A",
+  },
 ]
  
  at Promise.all.then.then.then (test/filtered-sync.test.js:71:34)
      at <anonymous>

PASS test/server.test.js (6.438s)

Test Suites: 2 failed, 7 passed, 9 total
Tests: 5 failed, 153 passed, 158 total
Snapshots: 65 passed, 65 total
Time: 10.578s

@ai
Copy link
Member

ai commented Jun 25, 2017

@sairus2k it is Yarn cache problem (sometimes cache uses old version of dependency if you are taking it by Git). This will solve the problem:

yarn cache clean
rm -R node_modules
yarn

@ai ai closed this as completed Jun 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants