RangerMauve / hyper-sdk

Make your own hyper apps!
https://www.youtube.com/watch?v=HyHk4aImd_I&list=PL7sG5SCUNyeYx8wnfMOUpsh7rM_g0w_cu&index=20
MIT License
292 stars 45 forks source link

Refactor test system #86

Closed martinheidegger closed 3 years ago

martinheidegger commented 3 years ago

Refactor test system

Note: the browser tests fail at the moment because the name gateway https://gateway.mauve.moe/ seems down.

RangerMauve commented 3 years ago

I seem to have forgotten how dat-gateway was even running in the first place. 😅 I'll fix that up today and merge this PR.

Thank you for all the hard work!

RangerMauve commented 3 years ago

Browser tests are getting an error here:

not ok 23 hyperspace: Hypercore - load from network timed out after 120000ms

  ---
    operator: fail
    stack: |-
      Error: hyperspace: Hypercore - load from network timed out after 120000ms
          at Test.assert [as _assert] (http://localhost:36461/node_modules/tape/lib/test.js:304:54)
          at Test.bound [as _assert] (http://localhost:36461/node_modules/tape/lib/test.js:91:32)
          at Test.fail (http://localhost:36461/node_modules/tape/lib/test.js:398:10)
          at Test.bound [as fail] (http://localhost:36461/node_modules/tape/lib/test.js:91:32)
          at http://localhost:36461/node_modules/tape/lib/test.js:173:14
  ...

Also when they exit I get this error on Linux:

node:events:306
      throw er; // Unhandled 'error' event
      ^

Error: libva error: /usr/lib/x86_64-linux-gnu/dri/i965_drv_video.so init failed
    at ChildProcess.<anonymous> (/home/mauve/programming/sdk/node_modules/electron-stream/index.js:112:26)
    at ChildProcess.emit (node:events:329:20)
    at maybeClose (node:internal/child_process:1055:16)
    at Socket.<anonymous> (node:internal/child_process:441:11)
    at Socket.emit (node:events:329:20)
    at Pipe.<anonymous> (node:net:655:12)
Emitted 'error' event on Electron instance at:
    at ChildProcess.<anonymous> (/home/mauve/programming/sdk/node_modules/electron-stream/index.js:112:12)
    at ChildProcess.emit (node:events:329:20)
    [... lines matching original stack trace ...]

This is something we can figure out in future PRs I think.

martinheidegger commented 3 years ago

The error above exists in the current hyperspace system (not a result of the changes in this PR). It occurs not a everytime and seems to be a timing error in hyperspace. Running the tests again has a reasonable chance for the tests to pass 😅