From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-27.smtp.github.com (out-27.smtp.github.com [192.30.252.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by bl2.djc.id.au (Postfix) with ESMTPS id 7CBD01B5C39 for ; Mon, 06 Apr 2026 14:11:46 +1000 (AEST) Received: from github.com (hubbernetes-node-8dc292f.ash1-iad.github.net [10.56.173.25]) by smtp.github.com (Postfix) with ESMTPA id 67012C11B9; Sun, 5 Apr 2026 21:11:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=github.com; s=pf2023; t=1775448704; bh=HAh22tkYOsefz0qLs9/hJGG0XVyp3kEUrtP53qd8Gp0=; h=Date:From:To:Subject:List-Unsubscribe:From; b=aM2JbBEDADhOL20CbETPjfooQvLEbprx1F+my2v04nj5Ua369xyq+kSDY8m9P1bpt LazmqeWIgy7iTGAhAIAXMt9/bWjSjm8yct1r6s7TkHaM6pwhYxz2sfWRNKu4ZD5lOB GruqEqJO8ZIfgIb2q12/GDOOxbMEhzVNRXc+xyI4= Date: Sun, 05 Apr 2026 21:11:44 -0700 From: Dan Callaghan To: djc@djc.id.au, sup-commits@supmua.dev Message-ID: Subject: [sup-heliotrope/sup] 6a5717: tests: avoid leaking index writes from TestIndex Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit List-Unsubscribe: X-GitHub-Recipient-Address: djc@djc.id.au,sup-commits@supmua.dev X-Auto-Response-Suppress: All X-Rspamd-Queue-Id: 7CBD01B5C39 List-Id: Branch: refs/heads/develop Home: https://github.com/sup-heliotrope/sup Commit: 6a5717ce15cb23dbe7ddfe3db74b6f63d22034db https://github.com/sup-heliotrope/sup/commit/6a5717ce15cb23dbe7ddfe3db74b6f63d22034db Author: Dan Callaghan 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 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