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

Commit 55afc2f

Browse files
authored
fix: flaky timeout test (#3767)
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.
1 parent 62311f8 commit 55afc2f

File tree

2 files changed

+2
-2
lines changed
  • packages
    • interface-ipfs-core/src/dag
    • ipfs-message-port-client/test/util

2 files changed

+2
-2
lines changed

packages/interface-ipfs-core/src/dag/get.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ module.exports = (common, options) => {
6565
})
6666

6767
it('should respect timeout option when getting a DAG node', () => {
68-
return testTimeout(() => ipfs.dag.get(CID.parse('QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88NSyxwA3rAQ'), {
68+
return testTimeout(() => ipfs.dag.get(CID.parse('QmPv52ekjS75L4JmHpXVeuJ5uX2ecSfSZo88NSyxwA3rAd'), {
6969
timeout: 1
7070
}))
7171
})

packages/ipfs-message-port-client/test/util/worker.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const IPFS = require('ipfs-core')
44
const { IPFSService, Server } = require('ipfs-message-port-server')
55

66
const main = async connections => {
7-
const ipfs = await IPFS.create({ offline: true, start: false })
7+
const ipfs = await IPFS.create()
88
const service = new IPFSService(ipfs)
99
const server = new Server(service)
1010

0 commit comments

Comments
 (0)