From 695adc1f6bfb0a0eeef4dd6c035475ea2826871f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Jun 2025 20:10:38 +0300 Subject: Complete GUI decoupling implementation for headless testing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Implement MessageHandler pattern to decouple message sending from visualization - Add HeadlessLoader to load simulations without GUI components - Create HeadlessProtocolRunner for clean protocol test execution - Update VSInternalProcess to use MessageHandler for message routing - Add null checks in VSSimulator for headless mode compatibility - Update VSSimulatorVisualization paint() to check for headless mode - Remove obsolete test scripts and documentation - Update test-protocols.sh to remove GUI error suppression options - Consolidate testing documentation in docs/testing-guide.md All protocol tests now run cleanly in headless mode without GUI errors, enabling proper CI/CD integration and automated testing. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- src/test/java/protocols/implementations/VSRaftProtocolTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/test/java/protocols') diff --git a/src/test/java/protocols/implementations/VSRaftProtocolTest.java b/src/test/java/protocols/implementations/VSRaftProtocolTest.java index e838f51..a5bff12 100644 --- a/src/test/java/protocols/implementations/VSRaftProtocolTest.java +++ b/src/test/java/protocols/implementations/VSRaftProtocolTest.java @@ -259,8 +259,8 @@ class VSRaftProtocolTest { protocol.onClientStart(); - // Should schedule client requests - verify(mockProcess).getTime(); + // onClientStart is empty for Raft protocol (clients respond to server heartbeats) + // So we shouldn't expect any interactions here // Simulate scheduled client request protocol.onClientSchedule(); -- cgit v1.2.3