Files
OrcaSlicer/tests
Kris Austin 2054242884 Fix Creality print host hanging on a printer that stops answering (#16772)
ws_connect(), query_boxes_info() and start_print() set expires_after()
deadlines, then made synchronous Beast calls. Beast only applies those
deadlines to async operations, so none of them fired. A printer that
accepted the websocket and then stopped answering blocked the caller
forever. That froze the GUI thread when the Creality send dialog opened
or the sidebar synced filaments, and left uploads stuck after the file
arrived.

Run every websocket call as an async operation on the local io_context,
so the deadlines apply. run_until_done() and the per-address connect
loop move from MoonrakerPrinterAgent.cpp into AsioUtils.hpp, and both
files share them. Each resolved address gets its own connect deadline,
and start_print() gets a reply deadline for its commands. A start-print
timeout shows the translated timeout message that HTTP timeouts already
use, now shared through PrintHost::timed_out_message(), and other
websocket errors drop Boost's source location.

The websocket port and deadlines move into a protected ws_settings
member, so the tests can use a local port and short deadlines. The new
tests run CrealityPrint against a fake printer that goes silent before
or after the handshake.
2026-10-24 22:01:15 -05:00
..
2025-12-08 22:42:11 +08:00

OrcaSlicer tests

Building, running and writing tests is documented on the wiki, under How to Test.

Two files here rather than there, because coding agents only read what is in the repository:

  • AGENTS.md is the same guidance in short form, and is what an agent working under tests/ picks up.
  • CATCH2.md is the Catch2 reference, including the mistakes that break a test at runtime.