# Shell 1: reply OK first time, then show the other messages
while true ; do nc -l -p 8889 -c 'echo -e "HTTP/1.1 200 OK\n\n $(date)"'; echo 'Replied OK to coordinator, now listening...'; nc -kl 8889; done
# Shell 2: create LRA with timelimit on join
COORDINATOR_URL=http:echo "Creating new LRA"
LRA_URL=$(curl -X POST $COORDINATOR_URL/start | sed "s/\"echo "Joining LRA"
curl -X PUT $LRA_URL?TimeLimit=8000 -d http:
# ... Wait 8 seconds for shell 1 to reply OK to timeout-compensate
# On shell 2:
curl $COORDINATOR_URL
# This will show that the LRA is still active and all flags are false (compensated=false, compensating=false, ..)
# We can even close it
curl -X PUT $LRA_URL/close
# On shell 1 you'll see a call to /complete (note that participant has already compensated)