Close replication task streams after use

Unclosed directory streams can retain open directory handles while
task storage is scanned. Close the running-task stream during recovery
and require callers of the waiting/running stream APIs to manage the
resource explicitly.

Update storage tests and integration helpers to use try-with-resources,
and add a regression test that verifies recovery closes its stream.

Release-Notes: Prevent directory-stream leaks in task storage
Change-Id: I1ea61ae9a428aa61765c8f28a3ff7f8455356920
5 files changed
tree: 38de093827ca9a91ec33650b1e9f7fb49d3c7adf
  1. .settings/
  2. src/
  3. .gitignore
  4. .mailmap
  5. BUILD
  6. LICENSE