openbci-archive / OpenBCI_NodeJS

Node.js SDK for the all OpenBCI Biosensor Boards
https://www.npmjs.com/package/openbci
137 stars 52 forks source link

Tests fail on real stock v1 board #99

Open baffo32 opened 7 years ago

baffo32 commented 7 years ago

Tested for the first time with a real board, since I was refactoring a little and wanted to ensure things still worked. The SNTP failures are normal for me, but the others aren't.

This is a 32-bit board I received from OpenBCI in early-mid 2016. I have never upgraded the firmware.

     Error: timeout of 20000ms exceeded. Ensure the done() callback is being called in this test.

Board was in a frozen state.

     Error: timeout of 3000ms exceeded. Ensure the done() callback is being called in this test.
     Error: done() invoked with non-Error: Error [.streamStart()]: Already streaming
      at test/openBCIBoard-test.js:462:47
     Error: done() invoked with non-Error: Error [.streamStart()]: Already streaming
      at test/openBCIBoard-test.js:462:47
     Error: timeout of 3000ms exceeded. Ensure the done() callback is being called in this test.
     Error: done() called multiple times
      at Suite.<anonymous> (test/openBCIBoard-test.js:510:7)
      at Suite.<anonymous> (test/openBCIBoard-test.js:502:5)
      at Suite.<anonymous> (test/openBCIBoard-test.js:414:3)
      at Object.<anonymous> (test/openBCIBoard-test.js:17:1)
      at require (internal/module.js:12:17)
      at Array.forEach (native)
      at node.js:974:3
     Error: done() called multiple times
      at Suite.<anonymous> (test/openBCIBoard-test.js:510:7)
      at Suite.<anonymous> (test/openBCIBoard-test.js:502:5)
      at Suite.<anonymous> (test/openBCIBoard-test.js:414:3)
      at Object.<anonymous> (test/openBCIBoard-test.js:17:1)
      at require (internal/module.js:12:17)
      at Array.forEach (native)
      at node.js:974:3
     Error: done() invoked with non-Error: no board connected
      at test/openBCIBoard-test.js:520:25
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
     Error: timeout of 2000ms exceeded. Ensure the done() callback is being called in this test.
     Error: Error Resource temporarily unavailable Cannot lock port
      at Error (native)
     Error: Error Resource temporarily unavailable Cannot lock port
      at Error (native)
     Error: timeout of 4000ms exceeded. Ensure the done() callback is being called in this test.
     Error: timeout of 4000ms exceeded. Ensure the done() callback is being called in this test.
     Error: timeout of 4000ms exceeded. Ensure the done() callback is being called in this test.
andrewjaykeller commented 7 years ago

If i had a known issues section i would put this here...

The tests worked at some point a while ago but at one point I lost it and have been meaning to get it working but ran out of time. I really would love to get this going.

andrewjaykeller commented 7 years ago

I think a majority of tests should not use the real board, there needs to be a better separation of functional tests from unit tests.

andrewjaykeller commented 7 years ago

Detect this situation and instruct the user to powercycle their OpenBCI (and upgrade their firmware)

haha love it

andrewjaykeller commented 7 years ago

I think you're doing great work. Reviewing as fast as I can! Thanks!