@@ -264,6 +264,9 @@ func TestHAMTEnumerationWhenComputingSize(t *testing.T) {
264
264
//oldShardWidth := DefaultShardWidth
265
265
//defer func() { DefaultShardWidth = oldShardWidth }()
266
266
//DefaultShardWidth = 8
267
+ // FIXME: We should be able to use a smaller DefaultShardWidth to have
268
+ // a deeper tree and cheaper tests once the import cycle is resolved
269
+ // in hamt.CreateFullShard.
267
270
268
271
treeHeight := 2
269
272
thresholdToWidthRatio := 4
@@ -285,9 +288,7 @@ func TestHAMTEnumerationWhenComputingSize(t *testing.T) {
285
288
assert .NoError (t , err )
286
289
287
290
sequentialDagService .ResetCounter ()
288
- // FIXME: Revert to const timeout after debugging.
289
- below , timeoutExceeded := hamtDir .sizeBelowThreshold (1 , func (ctx context.Context , _ * ipld.Link ) {
290
- })
291
+ below , timeoutExceeded := hamtDir .sizeBelowThreshold (EvaluateHAMTTransitionTimeout , nil )
291
292
assert .False (t , below )
292
293
assert .False (t , timeoutExceeded )
293
294
assert .Equal (t , nodesToFetch , sequentialDagService .UniqueCidsFetched ())
@@ -433,10 +434,14 @@ func TestDirBuilder(t *testing.T) {
433
434
}
434
435
435
436
// serialFetchDag is a DAG service that keeps track of requested nodes
436
- // and serves them in FIFO order to keep tight control on requests.
437
+ // and serves them in FIFO order to keep tight control on requests. (We
438
+ // don't use GetMany.)
439
+ // FIXME: We still depend on the walk function to be sequential. The name
440
+ // here might be misleading.
437
441
type serialFetchDag struct {
438
442
ipld.DAGService
439
443
444
+ // FIXME: Remove if we won't be using it for now.
440
445
nextNode <- chan struct {}
441
446
cidsFetched map [cid.Cid ]struct {}
442
447
mapLock sync.Mutex
0 commit comments