mount: close the meta cache after the follow-cancel test joins it

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chris LuandClaude Opus 5.5 committed 2026-11-28 14:05:01 -08:00
1 parent 06da9a9de7
commit 99254779f1
1 file changed
+10
@@ -286,11 +286,21 @@ func TestMountMetaFollowCancelIsAStop(t *testing.T) {
ctx, cancel := context.WithCancel(context.Background())
stopped := make(chan error, 1)
joined := make(chan struct{})
var retries atomic.Int32
go func() {
defer close(joined)
stopped <- meta_cache.SubscribeMetaEvents(ctx, wfs.metaCache, wfs.signature, wfs, nil, "/", 0, false,
func(int64, error) { retries.Add(1) })
}()
t.Cleanup(func() {
cancel()
select {
case <-joined:
wfs.metaCache.Shutdown()
case <-time.After(10 * time.Second):
}
})
select {
case <-filer.subscribed: