@@ -257,23 +257,45 @@ jobs:
257257
258258 - name : Start ${{ matrix.cfengine }} Server
259259 run : |
260- # Start fresh like in the working test
260+ # Debug what's happening
261+ echo "=== Pre-server check ==="
262+ ps aux | grep -E "(java|box)" | grep -v grep || echo "No Java/Box processes"
263+
264+ # Start fresh
261265 cd $HOME
262266 mkdir test-server
263267 cd test-server
264268
265- echo "=== Starting simple test server ==="
266- echo '<cfoutput>Hello from Test Server!</cfoutput>' > index.cfm
269+ echo '<cfoutput>Hello!</cfoutput>' > index.cfm
267270
268- # Start server exactly like in working test
269- timeout 60s box server start port=60006 --console || {
270- echo "Server start failed or timed out"
271- box server list
272- }
271+ # Try without timeout first to see full output
272+ echo "=== Starting server without timeout ==="
273+ box server start port=8080 &
274+ SERVER_PID=$!
275+
276+ # Monitor for 30 seconds
277+ for i in {1..6}; do
278+ echo "Check $i/6..."
279+ sleep 5
280+
281+ # Check if process is alive
282+ if ! ps -p $SERVER_PID > /dev/null; then
283+ echo "Server process died!"
284+ break
285+ fi
286+
287+ # Try to connect
288+ if curl -s http://localhost:8080/ > /dev/null; then
289+ echo "Server is responding!"
290+ curl http://localhost:8080/
291+ exit 0
292+ fi
293+ done
273294
274- # Test immediately
275- sleep 10
276- curl -f http://localhost:60006/ && echo "Server started successfully!"
295+ echo "Server did not start within 30 seconds"
296+ ps aux | grep -E "(java|box)" | grep -v grep || echo "No processes found"
297+ box server list || echo "Could not list servers"
298+ exit 1
277299
278300 # Ensure the public directory exists
279301 if [ ! -d "public" ]; then
0 commit comments