Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Migrate to pull-streams #12

Merged
merged 4 commits into from
Sep 5, 2016
Merged

Migrate to pull-streams #12

merged 4 commits into from
Sep 5, 2016

Conversation

daviddias
Copy link
Member

@daviddias daviddias commented Aug 19, 2016

It was rather easy :) @dignifiedquire wanna CR please?

  • Depends on the release of interface-connection with pull-streams

@dignifiedquire
Copy link
Member

We can do it this way for now, but we should plan time for moving to "native" pull-streams here, otherwise we still include all the readable-stream baggage in our dependencies.

@dignifiedquire
Copy link
Member

Tests are failing for me at the moment:

js-libp2p-webrtc-star git:(pull) ✗ npm test

> [email protected] test /Users/dignifiedquire/opensource/ipfs/js-libp2p-webrtc-star
> gulp test

[11:46:31] Using gulpfile ~/opensource/ipfs/js-libp2p-webrtc-star/gulpfile.js
[11:46:31] Starting 'test'...
[11:46:31] Starting 'test:node'...
[11:46:31] Starting 'mocha'...


  signalling server
    ✓ start and stop signalling server (default port) (97ms)
    ✓ start and stop signalling server (custom port)
    ✓ start signalling server for client tests
    ✓ zero peers
    ✓ connect one client (343ms)
    ✓ connect three more clients
    ✓ ss-join first client
    ✓ ss-join and ss-leave second client
    ✓ ss-join and disconnect third client
    ✓ ss-join the fourth
    ✓ c1 handshake c4
    ✓ c1 handshake c2 fail (does not exist anymore)
    ✓ stop signalling server


  13 passing (565ms)

[11:46:33] Finished 'mocha' after 1.23 s
[11:46:33] Finished 'test:node' after 1.23 s
[11:46:33] Starting 'test:browser'...
[11:46:33] Starting 'test:browser:before'...
sig-server started on: http://dignified-station-4.local:15555
[11:46:33] Finished 'test:browser:before' after 90 ms
[11:46:33] Starting 'karma'...
24 08 2016 11:46:33.507:WARN [watcher]: Pattern "/Users/dignifiedquire/opensource/ipfs/js-libp2p-webrtc-star/test/**/*.spec.js" does not match any file.


24 08 2016 11:46:51.791:WARN [karma]: Port 9876 in use
24 08 2016 11:46:51.792:INFO [karma]: Karma v1.2.0 server started at http://localhost:9877/
24 08 2016 11:46:51.792:INFO [launcher]: Launching browsers Chrome, PhantomJS with concurrency 1
24 08 2016 11:46:51.803:INFO [launcher]: Starting browser Chrome
24 08 2016 11:46:53.538:INFO [Chrome 52.0.2743 (Mac OS X 10.11.6)]: Connected on socket /#qdhBvNTxN7T8pdRQAAAA with id 63834521
  instantiate the transport
    ✓ create (2ms)
    ✓ create without new

  filter
    ✓ filters non valid webrtc-star multiaddrs (6ms)
    ✓ filter a single addr for this transport (1ms)

  listen
    ✓ listen, check for callback (163ms)
    ✓ listen, check for listening event (114ms)
    ✓ listen, check for the close event (117ms)
    - close listener with connections, through timeout
    - listen on IPv6 addr
    ✓ getAddrs (121ms)

  dial
    1) dial on IPv4, check callback
    2) dial on IPv4, check for connect event
    - dial on IPv6

  peer discovery
    ✓ listen on the first (144ms)
    ✓ listen on the second, discover the first (15ms)

  valid Connection
    3) "before all" hook
24 08 2016 11:46:55.394:INFO [launcher]: Starting browser PhantomJS
24 08 2016 11:46:56.105:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket /#jd3bueKYB42k1OHFAAAL with id 6276794

  instantiate the transport
    ✓ create (10ms)
    ✓ create without new

  filter
    ✓ filters non valid webrtc-star multiaddrs (4ms)
    ✓ filter a single addr for this transport

  listen
    ✓ listen, check for callback (123ms)
    ✓ listen, check for listening event (111ms)
    ✓ listen, check for the close event (118ms)
    - close listener with connections, through timeout
    - listen on IPv6 addr
    ✓ getAddrs (115ms)


  18 passing (23s)
  5 pending
  3 failing

  1) dial dial on IPv4, check callback:
     Error: no read cannot resolve!undefined
    at Function.read.resolve (webpack:///interface-connection/~/pull-defer/source.js:19:0 <- test/browser.js:49188:22)
    at Object.resolve (webpack:///interface-connection/~/pull-defer/duplex.js:14:0 <- test/browser.js:49131:14)
    at Connection.setInnerConn (webpack:///interface-connection/src/connection.js:54:0 <- test/browser.js:50806:17)
    at new Connection (webpack:///interface-connection/src/connection.js:17:0 <- test/browser.js:50769:12)
    at WebRTCStar.dial (webpack:///src/webrtc-star/index.js:46:0 <- test/browser.js:50887:16)
    at Context.<anonymous> (webpack:///test/webrtc-star/test-dial.js:42:0 <- test/browser.js:72184:9)



  2) dial dial on IPv4, check for connect event:
     Error: no read cannot resolve!undefined
    at Function.read.resolve (webpack:///interface-connection/~/pull-defer/source.js:19:0 <- test/browser.js:49188:22)
    at Object.resolve (webpack:///interface-connection/~/pull-defer/duplex.js:14:0 <- test/browser.js:49131:14)
    at Connection.setInnerConn (webpack:///interface-connection/src/connection.js:54:0 <- test/browser.js:50806:17)
    at new Connection (webpack:///interface-connection/src/connection.js:17:0 <- test/browser.js:50769:12)
    at WebRTCStar.dial (webpack:///src/webrtc-star/index.js:46:0 <- test/browser.js:50887:16)
    at Context.<anonymous> (webpack:///test/webrtc-star/test-dial.js:49:0 <- test/browser.js:72191:20)



  3) valid Connection "before all" hook:
     Error: Uncaught Error: no read cannot resolve!undefined (webpack:///interface-connection/~/pull-defer/source.js:19:0 <- test/browser.js:49188)

@dignifiedquire
Copy link
Member

Ignore me, I didn't pull all commits. This is passing fine

@daviddias
Copy link
Member Author

daviddias commented Sep 1, 2016

RFM 👌🏽

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants