From 19aa4e12d534c54041812568d5b62789c81d473b Mon Sep 17 00:00:00 2001 From: Aleksej Date: Mon, 13 Jun 2022 22:24:07 +0200 Subject: [PATCH] kill test bots after some time --- test/test.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/test.sh b/test/test.sh index b789706..e87c0fa 100755 --- a/test/test.sh +++ b/test/test.sh @@ -15,10 +15,20 @@ docker exec -it xmppbot-test bin/ejabberdctl create_room testroom1 conference.lo docker exec -it xmppbot-test bin/ejabberdctl create_room testroom2 conference.localhost localhost # Run xmpp mirror bot -python3 ../xmppmirror & +python3 ../xmppmirror & XMPPMIRRORPID=$! # Run xmpp test bot -python3 testbot +python3 testbot & TESTBOTPID=$! + +# Wait for bots to connect +sleep 10 + +# Wait certain amount of time for every test message in the file +for i in $(cat testmsgs); do sleep 5; done + +# Kill bots +kill XMPPMIRRORPID +kill TESTBOTPID # Stop and remove containter docker stop xmppbot-test