Skip to content

Commit

Permalink
Flaky blobs caps systemtest
Browse files Browse the repository at this point in the history
  • Loading branch information
eccles committed Jul 18, 2024
1 parent 7de13d4 commit 02a1d07
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions azblob/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,23 @@ func (azp *Storer) Count(ctx context.Context, tagsFilter string, opts ...Option)

logger.Sugar.Debugf("Count")

r, err := azp.FilteredList(ctx, tagsFilter, opts...)
if err != nil {
return 0, err
}

return int64(len(r.Items)), nil
var count int64
var m string
opts = append(opts, WithListMarker(&m))

for {
r, err := azp.FilteredList(ctx, tagsFilter, opts...)
if err != nil {
return 0, err
}
count += int64(len(r.Items))
logger.Sugar.Debugf("Count %d (%v)", count, r.Marker)
if r.Marker == nil {
break
}
}
logger.Sugar.Debugf("Count %d", count)
return count, nil
}

type FilterResponse struct {
Expand Down

0 comments on commit 02a1d07

Please sign in to comment.