Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 70b8cd7

Browse files
authored
chore: make Travis a little bit more happy (#1109)
* wip * refactor bitswap tests * travis, you can do it! * bora lá * last mile * one more time * another round * one more time
1 parent 93cc273 commit 70b8cd7

File tree

12 files changed

+314
-321
lines changed

12 files changed

+314
-321
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
"expose-loader": "^0.7.4",
7676
"form-data": "^2.3.1",
7777
"hat": "0.0.3",
78-
"interface-ipfs-core": "~0.36.8",
78+
"interface-ipfs-core": "~0.36.11",
7979
"ipfsd-ctl": "~0.25.1",
8080
"left-pad": "^1.2.0",
8181
"lodash": "^4.17.4",

test/cli/files.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ describe('files', () => runOnAndOff((thing) => {
107107
})
108108

109109
it('add with progress', function () {
110-
this.timeout(20 * 1000)
110+
this.timeout(30 * 1000)
111111

112112
return ipfs('files add -p src/init-files/init-docs/readme')
113113
.then((out) => {
@@ -117,7 +117,7 @@ describe('files', () => runOnAndOff((thing) => {
117117
})
118118

119119
it('add', function () {
120-
this.timeout(20 * 1000)
120+
this.timeout(30 * 1000)
121121

122122
return ipfs('files add src/init-files/init-docs/readme')
123123
.then((out) => {
@@ -127,7 +127,7 @@ describe('files', () => runOnAndOff((thing) => {
127127
})
128128

129129
it('add alias', function () {
130-
this.timeout(20 * 1000)
130+
this.timeout(30 * 1000)
131131

132132
return ipfs('add src/init-files/init-docs/readme')
133133
.then((out) => {
@@ -137,7 +137,7 @@ describe('files', () => runOnAndOff((thing) => {
137137
})
138138

139139
it('add recursively test', function () {
140-
this.timeout(20 * 1000)
140+
this.timeout(60 * 1000)
141141

142142
return ipfs('files add -r test/fixtures/test-data/recursive-get-dir')
143143
.then((out) => {
@@ -146,7 +146,7 @@ describe('files', () => runOnAndOff((thing) => {
146146
})
147147

148148
it('add directory with trailing slash test', function () {
149-
this.timeout(20 * 1000)
149+
this.timeout(30 * 1000)
150150

151151
return ipfs('files add -r test/fixtures/test-data/recursive-get-dir/')
152152
.then((out) => {
@@ -155,7 +155,7 @@ describe('files', () => runOnAndOff((thing) => {
155155
})
156156

157157
it('add and wrap with a directory', function () {
158-
this.timeout(20 * 1000)
158+
this.timeout(30 * 1000)
159159

160160
return ipfs('add -w src/init-files/init-docs/readme').then((out) => {
161161
expect(out).to.be.eql([
@@ -166,7 +166,7 @@ describe('files', () => runOnAndOff((thing) => {
166166
})
167167

168168
it('add with cid-version=0', function () {
169-
this.timeout(20 * 1000)
169+
this.timeout(30 * 1000)
170170

171171
return ipfs('add src/init-files/init-docs/readme --cid-version=0').then((out) => {
172172
expect(out)
@@ -184,7 +184,7 @@ describe('files', () => runOnAndOff((thing) => {
184184
//
185185
// This retains feature parity without having to implement raw-leaves.
186186
it('add with cid-version=1', function () {
187-
this.timeout(20 * 1000)
187+
this.timeout(30 * 1000)
188188

189189
return new Promise((resolve, reject) => {
190190
ipfs('add src/init-files/init-docs/readme --cid-version=1')
@@ -214,7 +214,7 @@ describe('files', () => runOnAndOff((thing) => {
214214
//
215215
// This retains feature parity without having to implement raw-leaves.
216216
it('add with cid-version=1 and raw-leaves=true', function () {
217-
this.timeout(20 * 1000)
217+
this.timeout(30 * 1000)
218218

219219
return new Promise((resolve, reject) => {
220220
ipfs('add src/init-files/init-docs/readme --cid-version=1 --raw-leaves=true')
@@ -227,7 +227,7 @@ describe('files', () => runOnAndOff((thing) => {
227227
})
228228

229229
it('add --quiet', function () {
230-
this.timeout(20 * 1000)
230+
this.timeout(30 * 1000)
231231

232232
return ipfs('files add -q src/init-files/init-docs/readme')
233233
.then((out) => {
@@ -237,7 +237,7 @@ describe('files', () => runOnAndOff((thing) => {
237237
})
238238

239239
it('add --quieter', function () {
240-
this.timeout(20 * 1000)
240+
this.timeout(30 * 1000)
241241

242242
return ipfs('files add -Q -w test/fixtures/test-data/hello test/test-data/node.json')
243243
.then((out) => {
@@ -247,7 +247,7 @@ describe('files', () => runOnAndOff((thing) => {
247247
})
248248

249249
it('add --silent', function () {
250-
this.timeout(20 * 1000)
250+
this.timeout(30 * 1000)
251251

252252
return ipfs('files add --silent src/init-files/init-docs/readme')
253253
.then((out) => {
@@ -257,7 +257,7 @@ describe('files', () => runOnAndOff((thing) => {
257257
})
258258

259259
it('cat', function () {
260-
this.timeout(20 * 1000)
260+
this.timeout(30 * 1000)
261261

262262
return ipfs('files cat QmPZ9gcCEpqKTo6aq61g2nXGUhM4iCL3ewB6LDXZCtioEB')
263263
.then((out) => {

test/cli/id.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ describe('id', () => runOnAndOff((thing) => {
88
let ipfs
99

1010
before(function () {
11-
this.timeout(40 * 1000)
11+
this.timeout(60 * 1000)
1212
ipfs = thing.ipfs
1313
})
1414

1515
it('get the id', function () {
16-
this.timeout(40 * 1000)
16+
this.timeout(60 * 1000)
1717

1818
return ipfs('id').then((res) => {
1919
const id = JSON.parse(res)

test/cli/pubsub.js

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ describe('pubsub', function () {
2626
const topicC = 'nonscentsC'
2727

2828
before(function (done) {
29-
this.timeout(40 * 1000)
29+
this.timeout(60 * 1000)
3030

3131
instanceFactory = new InstanceFactory()
3232
instanceFactory.spawnNode((err, _node) => {
@@ -73,7 +73,7 @@ describe('pubsub', function () {
7373
})
7474

7575
it('ls', function () {
76-
this.timeout(40 * 1000)
76+
this.timeout(80 * 1000)
7777

7878
const sub = cli(`pubsub sub ${topicB}`)
7979

@@ -108,32 +108,31 @@ describe('pubsub', function () {
108108
})
109109
}
110110

111-
series(
112-
[
113-
(cb) => httpApi.id((err, peerInfo) => {
114-
expect(err).to.not.exist()
115-
peerAddress = peerInfo.addresses[0]
116-
expect(peerAddress).to.exist()
117-
cb()
118-
}),
119-
(cb) => node.id((err, peerInfo) => {
120-
expect(err).to.not.exist()
121-
instancePeerId = peerInfo.id.toString()
122-
cb()
123-
}),
124-
(cb) => node.swarm.connect(peerAddress, cb),
125-
(cb) => node.pubsub.subscribe(topicC, handler, cb)
126-
],
127-
(err) => {
111+
series([
112+
(cb) => httpApi.id((err, peerInfo) => {
128113
expect(err).to.not.exist()
129-
sub = cli(`pubsub sub ${topicC}`)
130-
131-
return Promise.all([
132-
sub.catch(ignoreKill),
133-
delay(1000)
134-
.then(() => cli(`pubsub pub ${topicC} world`))
135-
])
136-
})
114+
peerAddress = peerInfo.addresses[0]
115+
expect(peerAddress).to.exist()
116+
cb()
117+
}),
118+
(cb) => node.id((err, peerInfo) => {
119+
expect(err).to.not.exist()
120+
instancePeerId = peerInfo.id.toString()
121+
cb()
122+
}),
123+
(cb) => node.swarm.connect(peerAddress, cb),
124+
(cb) => node.pubsub.subscribe(topicC, handler, cb)
125+
],
126+
(err) => {
127+
expect(err).to.not.exist()
128+
sub = cli(`pubsub sub ${topicC}`)
129+
130+
return Promise.all([
131+
sub.catch(ignoreKill),
132+
delay(1000)
133+
.then(() => cli(`pubsub pub ${topicC} world`))
134+
])
135+
})
137136
})
138137
})
139138

test/cli/swarm.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ describe('swarm', () => {
1818
before(function (done) {
1919
// CI takes longer to instantiate the daemon, so we need to increase the
2020
// timeout for the before step
21-
this.timeout(60 * 1000)
21+
this.timeout(80 * 1000)
2222

2323
factory = new Factory()
2424

@@ -46,7 +46,7 @@ describe('swarm', () => {
4646
after((done) => factory.dismantle(done))
4747

4848
describe('daemon on (through http-api)', function () {
49-
this.timeout(40 * 1000)
49+
this.timeout(60 * 1000)
5050

5151
it('connect', () => {
5252
return ipfsA('swarm', 'connect', bMultiaddr).then((out) => {

0 commit comments

Comments
 (0)