Ensure timely termination of all flask servers
1. The chain_api was never terminated. This was fixed by turning the
server into an pyWSGI instance.
2. no monkey patching was applied. The monkey patching of gevent is
required in order to be able to handle other events during a
time.sleep() call. Since multiple patching is detected, it was added to
all files which create WSGI servers.
All in all this change fixes a large leak of threads, open files and
performance.
This change updates Containernet in order to fix race conditions which
otherwise happen due to gevent's monkey patching.
Change-Id: Ia45ad07db1f85046bfcac85eaca20c930b931141
Signed-off-by: schillinge <ablu@mail.uni-paderborn.de>
diff --git a/src/emuvim/test/base.py b/src/emuvim/test/base.py
index 6221765..9271f56 100755
--- a/src/emuvim/test/base.py
+++ b/src/emuvim/test/base.py
@@ -23,6 +23,10 @@
# the Horizon 2020 and 5G-PPP programmes. The authors would like to
# acknowledge the contributions of their colleagues of the SONATA
# partner consortium (www.sonata-nfv.eu).
+
+from gevent import monkey
+monkey.patch_all() # noqa: because otherwise pep complains about code before imports
+
import unittest
import os
import subprocess