Skip to content

Commit

Permalink
chore: remove use of timeout-abort-controller (#134)
Browse files Browse the repository at this point in the history
  • Loading branch information
maschad authored May 2, 2023
1 parent 88becd6 commit d2132ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,6 @@
"ipfs-http-client": "^60.0.0",
"ipfsd-ctl": "^13.0.0",
"it-all": "^2.0.0",
"timeout-abort-controller": "^3.0.0",
"uint8arrays": "^4.0.2",
"wherearewe": "^2.0.1"
},
Expand Down
7 changes: 2 additions & 5 deletions test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import type { PeerId } from '@libp2p/interface-peer-id'
import type { IDResult } from 'ipfs-core-types/src/root'
import type { PeerInfo } from '@libp2p/interface-peer-info'
import { stop } from '@libp2p/interfaces/startable'
import { TimeoutController } from 'timeout-abort-controller'
import type { AbortOptions } from '@libp2p/interfaces'
import { peerIdFromString } from '@libp2p/peer-id'

Expand Down Expand Up @@ -179,13 +178,11 @@ describe('DelegatedContentRouting', function () {
port: opts.port,
host: opts.host
}))()
const controller = new TimeoutController(5e3)
const signal = AbortSignal.timeout(5e3)

const providers = await all(routing.findProviders(cid, { signal: controller.signal }))
const providers = await all(routing.findProviders(cid, { signal }))

expect(providers.map((p) => p.id.toString())).to.include(bootstrapId.id.toString(), 'Did not include bootstrap node')

controller.clear()
})
})

Expand Down

0 comments on commit d2132ad

Please sign in to comment.