Skip to content

test suite leaves ~292 reader namespace directories per run (tests never call close()) #152

Description

@kiki830621

Problem

A full swift test run of ooxml-swift leaves about 292 directories behind under the reader's temp namespace (che-word-mcp/): tests open documents through DocxReader and never call close(), and each unclosed reader keeps its extraction directory.

Evidence (verify R10, regression lens)

Paired measurement after a 90-second idle control (Δ0): one full-suite run on base v3.6.4 adds +292 directories, one run on PR #141 head adds +292 — identical, so this is pre-existing test hygiene, not a library leak (the library's own read+close path measures Δ0; only no-close readers leave one directory each).

Why it matters

The shared namespace on a developer machine accumulates tens of thousands of entries (30 000+ observed), which slows every namespace-level measurement and makes leak probes noisy. It also hides real leaks: a test that forgets close() is indistinguishable from a library that forgets cleanup.

Fix sketch

A test helper that opens a document and registers close() in addTeardownBlock, applied across the suites (SidecarStore / SyncOrchestrator / DocxWriterWriteData already use per-test markers for their leak tests and could share the helper).

Refs #137. Surfaced by verify R10 of PR #141 (regression NEW-RG10-3).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions