mirror of
https://github.com/saphid/frame-control.git
synced 2026-10-06 04:04:21 +02:00
Bundled KDE Connect: one safety net for every launch failure
Any unexpected error while launching clears the launch and reports it, so the pad can always be started again; the temporary stderr file is made inside the handled path and a failure reading it is tolerated. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
98a5ec45bb
commit
41f08ac9a2
2 files changed
+32
-3
No files matched your search
@@ -379,6 +379,21 @@ class Bundled(unittest.TestCase):
|
||||
agent.start()
|
||||
self.wait_for(lambda: agent.status == {"state": "ready"})
|
||||
|
||||
def test_any_unexpected_error_still_reports_and_allows_a_retry(self):
|
||||
agent, launches, procs = self.lifecycle([])
|
||||
old = self.server.tempfile.TemporaryFile
|
||||
self.server.tempfile.TemporaryFile = lambda: (_ for _ in ()).throw(OSError(24, "Too many open files"))
|
||||
try:
|
||||
agent.start()
|
||||
self.wait_for(lambda: agent.status.get("state") == "error")
|
||||
finally:
|
||||
self.server.tempfile.TemporaryFile = old
|
||||
self.assertIsNone(agent.launching)
|
||||
agent.deliver = lambda report, force=False: (_ for _ in ()).throw(ValueError("something odd"))
|
||||
agent.start()
|
||||
self.wait_for(lambda: "something odd" in agent.status.get("message", ""))
|
||||
self.assertIsNone(agent.launching)
|
||||
|
||||
def test_copies_go_to_a_folder_of_their_own(self):
|
||||
first, _, _ = self.deliver(frame_has=False)
|
||||
second, _, _ = self.deliver(frame_has=False)
|
||||
|
||||
Reference in new issue
Block a user