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

Commit

Permalink
fix: flaky timeout test (#3767)
Browse files Browse the repository at this point in the history
If we run a node in offline mode only, it'll never go to the network
to fetch a CID it doesn't have, so we can't really test timeouts properly.
  • Loading branch information
achingbrain authored Jul 27, 2021
1 parent 62311f8 commit 55afc2f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/interface-ipfs-core/src/dag/get.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ module.exports = (common, options) => {
})

it('should respect timeout option when getting a DAG node', () => {
return testTimeout(() => ipfs.dag.get(CID.parse('QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88NSyxwA3rAQ'), {
return testTimeout(() => ipfs.dag.get(CID.parse('QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88NSyxwA3rAd'), {
timeout: 1
}))
})
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-message-port-client/test/util/worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const IPFS = require('ipfs-core')
const { IPFSService, Server } = require('ipfs-message-port-server')

const main = async connections => {
const ipfs = await IPFS.create({ offline: true, start: false })
const ipfs = await IPFS.create()
const service = new IPFSService(ipfs)
const server = new Server(service)

Expand Down

0 comments on commit 55afc2f

Please sign in to comment.