From 0841f0f9a1e3f3708d8c511a6290344e73607aab Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Sat, 21 Jun 2025 21:27:31 +0300 Subject: Move test scripts to scripts/ directory and fix simulation completion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Moved test-protocols.sh, test-quick.sh, test-verbose.sh to scripts/ - Updated references in README.md and docs/testing-guide.md - Fixed HeadlessSimulationRunner to properly run simulations to completion - Fixed message delivery timing (now respects 500-2000ms delays) - Added proper process time synchronization - Fixed HeadlessProtocolRunner to exit cleanly 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- scripts/test-quick.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 scripts/test-quick.sh (limited to 'scripts/test-quick.sh') diff --git a/scripts/test-quick.sh b/scripts/test-quick.sh new file mode 100755 index 0000000..a37c399 --- /dev/null +++ b/scripts/test-quick.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# Quick test to verify simulation runs correctly +# + +echo "Quick DS-Sim Protocol Test" +echo "=========================" +echo + +# Test ping-pong with shorter timeout +echo "Testing ping-pong protocol..." +timeout 5 java -cp target/classes:target/test-classes \ + -Djava.awt.headless=true \ + -Dds.sim.headless=true \ + testing.HeadlessProtocolRunner saved-simulations/ping-pong.dat + +if [ $? -eq 124 ]; then + echo "✗ Test timed out after 5 seconds" +else + echo "✓ Test completed successfully" +fi \ No newline at end of file -- cgit v1.2.3