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

Update webrtc and improve test consistency #211

Merged
merged 2 commits into from
Jun 29, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ci/Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// Warning: This file is automatically synced from https://github.com/ipfs/ci-sync so if you want to change it, please change it there and ask someone to sync all repositories.
javascript(['nodejs_versions': ['8.11.3']])
javascript()
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
"pull-serializer": "~0.3.2",
"pull-stream": "^3.6.8",
"sinon": "^5.0.7",
"wrtc": "0.1.1"
"wrtc": "~0.1.6"
Copy link
Member

Choose a reason for hiding this comment

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

Wooot! :D

},
"contributors": [
"Chris Bratlien <[email protected]>",
Expand Down
19 changes: 16 additions & 3 deletions test/peer-discovery.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ chai.use(require('dirty-chai'))
const expect = chai.expect
const signalling = require('libp2p-webrtc-star/src/sig-server')
const parallel = require('async/parallel')
const crypto = require('crypto')

const createNode = require('./utils/create-node')
const echo = require('./utils/echo')
Expand Down Expand Up @@ -62,7 +63,9 @@ describe('peer discovery', () => {
config: {
peerDiscovery: {
mdns: {
enabled: true
enabled: true,
// use a random tag to prevent CI collision
serviceTag: crypto.randomBytes(10).toString('hex')
}
}
}
Expand All @@ -81,7 +84,15 @@ describe('peer discovery', () => {

// TODO needs a delay (this test is already long)
describe.skip('WebRTCStar', () => {
setup({ webRTCStar: true })
setup({
config: {
peerDiscovery: {
webRTCStar: {
enabled: true
}
}
}
})

it('find a peer', function (done) {
this.timeout(15 * 1000)
Expand All @@ -98,7 +109,9 @@ describe('peer discovery', () => {
config: {
peerDiscovery: {
mdns: {
enabled: true
enabled: true,
// use a random tag to prevent CI collision
serviceTag: crypto.randomBytes(10).toString('hex')
},
webRTCStar: {
enabled: true
Expand Down