@@ -199,7 +199,7 @@ describe.skip('gc', function () {
199
199
// Pin first block
200
200
// Note: pin add will take a read lock
201
201
const pinLockRequested = pEvent ( lockEmitter , 'readLock request' )
202
- const pin1 = ipfs . pin . add ( cid1 )
202
+ const pin1 = last ( ipfs . pin . add ( cid1 ) )
203
203
204
204
// Once pin lock has been requested, start GC
205
205
await pinLockRequested
@@ -209,7 +209,7 @@ describe.skip('gc', function () {
209
209
210
210
// TODO: Adding pin for removed block never returns, which means the lock
211
211
// never gets released
212
- // const pin2 = ipfs.pin.add(cid2)
212
+ // const pin2 = last( ipfs.pin.add(cid2) )
213
213
214
214
// Confirm second second block has been removed
215
215
const localRefs = ( await ipfs . refs . local ( ) ) . map ( r => r . ref )
@@ -230,13 +230,13 @@ describe.skip('gc', function () {
230
230
const cid2 = ( await ipfs . block . put ( Buffer . from ( 'block to pin rm 2' ) , null ) ) . cid
231
231
232
232
// Pin blocks
233
- await ipfs . pin . add ( cid1 )
234
- await ipfs . pin . add ( cid2 )
233
+ await last ( ipfs . pin . add ( cid1 ) )
234
+ await last ( ipfs . pin . add ( cid2 ) )
235
235
236
236
// Unpin first block
237
237
// Note: pin rm will take a read lock
238
238
const pinLockRequested = pEvent ( lockEmitter , 'readLock request' )
239
- const pinRm1 = ipfs . pin . rm ( cid1 )
239
+ const pinRm1 = last ( ipfs . pin . rm ( cid1 ) )
240
240
241
241
// Once pin lock has been requested, start GC
242
242
await pinLockRequested
@@ -246,7 +246,7 @@ describe.skip('gc', function () {
246
246
247
247
// Once GC has started, start second pin rm
248
248
await gcStarted
249
- const pinRm2 = ipfs . pin . rm ( cid2 )
249
+ const pinRm2 = last ( ipfs . pin . rm ( cid2 ) )
250
250
251
251
const deleted = ( await gc ) . map ( i => i . cid . toString ( ) )
252
252
await pinRm1
0 commit comments