* [sup-heliotrope/sup] 6a5717: tests: avoid leaking index writes from TestIndex
@ 2026-04-06 4:11 Dan Callaghan
0 siblings, 0 replies; only message in thread
From: Dan Callaghan @ 2026-04-06 4:11 UTC (permalink / raw)
To: djc, sup-commits
Branch: refs/heads/develop
Home: https://github.com/sup-heliotrope/sup
Commit: 6a5717ce15cb23dbe7ddfe3db74b6f63d22034db
https://github.com/sup-heliotrope/sup/commit/6a5717ce15cb23dbe7ddfe3db74b6f63d22034db
Author: Dan Callaghan <djc@djc.id.au>
Date: 2026-04-06 (Mon, 06 Apr 2026)
Changed paths:
M test/unit/test_index.rb
Log Message:
-----------
tests: avoid leaking index writes from TestIndex
Fixes a randomly occurring test failure:
Finished in 5.187590s, 16.9636 runs/s, 74.4083 assertions/s.
1) Failure:
TestSupSyncBackMaildir#test_it_syncs_seen_unread_flags [/home/runner/work/sup/sup/test/integration/test_sup-sync-back-maildir.rb:36]:
Expected true to not be truthy.
88 runs, 386 assertions, 1 failures, 0 errors, 0 skips
Reproducible using:
nix-shell contrib/nix/ruby2.6-shell.nix --run 'rake test TESTOPTS=--seed=29609'
Bisected to commit b49dcfe7dd25100feb88ed8aefe629fd91423a26.
It seems Dir.mktmpdir is aggressively reusing temp directory names(!)
which in itself would be fine, since each test cleans up its temp
directory in teardown. But it seems that the newly added TestIndex was
leaving the Xapian database open and Xapian may write to it even after
the test teardown has finished... apparently re-creating the cleaned-up
temp directory in the process(!).
Since we have no way to explicitly close or destroy the index, the best
we can do is to explicitly flush it before removing the temp directory
so that it will not try to write again later.
Commit: ad657e383d6914c053b7cceff082c05c096d0245
https://github.com/sup-heliotrope/sup/commit/ad657e383d6914c053b7cceff082c05c096d0245
Author: Dan Callaghan <djc@djc.id.au>
Date: 2026-04-06 (Mon, 06 Apr 2026)
Changed paths:
M lib/sup/message_chunks.rb
Log Message:
-----------
delete unused Tempfile monkey-patch for Ruby < 1.8.7
Ruby 2.0+ has been required since commit cce594e35 so this is dead code.
Compare: https://github.com/sup-heliotrope/sup/compare/2837f0614381...ad657e383d69
To unsubscribe from these emails, change your notification settings at https://github.com/sup-heliotrope/sup/settings/notifications
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-04-06 4:11 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-06 4:11 [sup-heliotrope/sup] 6a5717: tests: avoid leaking index writes from TestIndex Dan Callaghan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox