#!/bin/bash set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$SCRIPT_DIR/../.." # Test UDP-only communication (no TCP join) # Both nodes start independently, OCaml adds Go to its membership # They should then be able to gossip via UDP echo "Starting Go memberlist server (no join)..." cd "$REPO_ROOT/interop" ./memberlist-server -name go-node -port 7946 & GO_PID=$! sleep 2 echo "Starting OCaml SWIM client (adds Go node manually)..." cd "$REPO_ROOT" timeout 20 ./_build/default/bin/interop_test.exe & OCAML_PID=$! # Let them communicate sleep 15 echo "Killing processes..." kill $GO_PID 2>/dev/null || true kill $OCAML_PID 2>/dev/null || true wait $GO_PID 2>/dev/null || true wait $OCAML_PID 2>/dev/null || true echo "Done"