Skip to content

Conversation

@yciabaud
Copy link
Contributor

This PR adds the websocket tracker to the test suite.
It is based on my scrape implementation (PR #125) because it is one required in the existing test case and the addition of the electron-webrtc package.

I improved the closing of the websocket tracker in the client to prevent hanging at the end of the case.

socket: undefined
})
} else {
t.equal(swarm.peers[peerId.toString('hex')].complete, false)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not test the rest of the properties on the swarm?

@feross
Copy link
Member

feross commented Mar 17, 2016

Nice work! It's great to have some tests for the websocket server! And especially nice work finding that we were closing the pooled socket even though others might be using it.

@feross
Copy link
Member

feross commented Mar 17, 2016

I'll merge and fix up your PR myself, because I want to release the pooled socket fix quickly.

@feross
Copy link
Member

feross commented Mar 17, 2016

Merged, though GitHub is not showing it for some reason.

@feross feross closed this Mar 17, 2016
@feross
Copy link
Member

feross commented Mar 17, 2016

@yciabaud I made all the changes – let me know if I misunderstood something and we can change it back.

feross added a commit that referenced this pull request Mar 17, 2016
@yciabaud yciabaud deleted the ws-test-electron branch March 17, 2016 08:21
@yciabaud
Copy link
Contributor Author

No problem with your fixes, thank you for merging. I am glad we have some tests on WS server too, this should avoid some bugs in the future.

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

Successfully merging this pull request may close these issues.

2 participants