diff --git a/weed/mq/offset/consumer_group_fence_test.go b/weed/mq/offset/consumer_group_fence_test.go index fbbef36fec..689f3fea42 100644 --- a/weed/mq/offset/consumer_group_fence_test.go +++ b/weed/mq/offset/consumer_group_fence_test.go @@ -32,7 +32,8 @@ type conditionalFiler struct { beforeWrite func() // looked counts the lookups of each path looked map[string]int - // failLookups fails the lookups of these paths, as a filer that cannot read them + // failLookups fails the lookups of these paths the way a filer whose store + // cannot read them does failLookups map[string]bool } @@ -44,7 +45,7 @@ func (f *conditionalFiler) LookupDirectoryEntry(ctx context.Context, req *filer_ } f.looked[req.Directory+"/"+req.Name]++ if f.failLookups[req.Directory+"/"+req.Name] { - return nil, status.Error(codes.Unavailable, "store unavailable") + return nil, errors.New("store unavailable") } entry, ok := f.entries[req.Directory+"/"+req.Name] if !ok {