mirror of
https://github.com/praktimarc/kst4contest.git
synced 2026-10-18 21:34:03 +02:00
* test: pin the Win-Test sked frames over a loopback socket (#106) WinTestSkedSender is pointed at the loopback address instead of a broadcast address, and a socket on an ephemeral port receives the LOCKSKED/ADDSKED/UNLOCKSKED sequence. The frames and their checksum byte are written out literally, including the \260 degree escape and the SSB fallback for an unexpected mode ID. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: cover the PSTRotator UDP client over loopback (#106) A socket on an ephemeral loopback port plays PSTRotator. The tests pin the poll queries, the <PST> command frames, the AZ:/EL:/MODE: replies reaching the listener, an unparsable reply leaving the loop alive, and the explicit-port constructor reporting its status after start() (#115). The reply format is derived from the parser and the PSTRotator UDP documentation, not from a capture. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: cover the AirScout UDP listener over loopback (#106) ReadUDPbyAirScoutMessageThread gains a package-private constructor that takes an already bound socket, as ReadUDPbyUCXMessageThread has; the public constructor still binds the configured port in run(). The tests pin applying an ASNEAREST response to every active variant of the receiver, the case-sensitive server/client match with a UTF-8 client name, the disabled listener, the poison pill, recovery from a malformed response, and the date losing its space because the parser strips all spaces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: cover UCXLog/DXLog QSO packets over loopback (#106) The UCX loopback test now sends contactinfo and contactreplace packets: transport bytes before the XML are dropped, the QSO reaches the controller with band, locator and source, the gross field is registered, an unknown station is stored in the database and the UDP backup file, a known one is only updated, and nothing happens while log sync is disabled. A RadioInfo packet sent afterwards serves as an ordering marker instead of a sleep. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: cover the local DX Cluster server over loopback (#106) DXClusterThreadPooledServer gains a package-private constructor that takes an already bound server socket; the public constructor still binds the configured port in run(). Plain sockets on the loopback address act as logging programs. The tests pin the listening status, the "login: " prompt, one DXSpider-style line with BEL BEL CR LF per spot to every client, the rejection of spots that cannot be formatted, and stop() closing the clients and ending the server thread. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the UCXLog/DXLog listener alive on bad input (#106) An unwritable or empty backup path left the FileWriter null, and the following BufferedWriter threw a NullPointerException; a RadioInfo without <Freq> or <Mode> threw one as well. Neither was caught, so the listener thread ended for good. The backup line is now written with try-with-resources and skipped with a log line when the file cannot be opened, an incomplete RadioInfo element is skipped, and run() drops a packet whose processing throws any RuntimeException, reports a non-critical status and keeps receiving. The loopback tests cover all three paths. The interrupt test now waits for a processed marker packet instead of sleeping and no longer claims more than it can observe, and the marker helper states its in-order assumption for UDP on loopback. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: let a second DX Cluster server run() bind again (#106) The pre-bound-socket constructor made run() skip binding whenever a server socket existed. A run() after the first one ended would then accept on a closed socket. Bind whenever the socket is missing or closed, which restores the behaviour of the public constructor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: make the ignored AirScout responses observable (#106) The tests for responses to another client or server and for the disabled listener only checked that nothing happened before the poison pill, which a listener that never read the datagrams would also pass. Each now sends a valid sentinel afterwards and waits for it, and the ignored responses name a different receiver, so a wrongly processed copy is detectable; the disabled case also shows that the switch was asked once per response. The date test is renamed and documented as a pinned known defect, so a parser fix knows to flip it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * test: wait for the PSTRotator listener thread after stop() (#106) The client keeps its listener thread private, so the test finds it by the name start() gives it and joins it after stop(), asserting that exactly one such thread existed and that it ended. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix: keep the UCX listener alive when the status callback throws (#106) Review follow-up. The safety net reported a dropped packet through the status callback without guarding it, so a throwing callback still ended the listener. The test for an unwritable backup file is renamed to what it proves, and the changelog mentions that any unexpected error now drops only the affected packet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>