aboutsummaryrefslogtreecommitdiffstats
path: root/test/csit
diff options
context:
space:
mode:
authorGary Wu <gary.i.wu@huawei.com>2018-09-21 14:50:38 +0000
committerGerrit Code Review <gerrit@onap.org>2018-09-21 14:50:38 +0000
commit38b3f388cba07d72f75ef1ef676e31e15081d695 (patch)
tree6133576d23c696e52699ea859e3acc758ba6c9d8 /test/csit
parent757b5cc3897bdc61cc085bea05fe13a1f7a440d0 (diff)
parent2002517aeadd62d3ce73b7b20fc6e0f1397bf5b1 (diff)
Merge "Add check for memory leak detection"
Diffstat (limited to 'test/csit')
-rwxr-xr-xtest/csit/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh10
-rw-r--r--test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py10
2 files changed, 13 insertions, 7 deletions
diff --git a/test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh b/test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh
index 84d36667e..246fb8363 100755
--- a/test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh
+++ b/test/csit/plans/dcaegen2-collectors-hv-ves/testsuites/teardown.sh
@@ -4,8 +4,14 @@ cd ssl
make clean
cd ..
-docker-compose logs > ${WORKSPACE}/archives/containers_logs/docker-compose.log
+COMPOSE_LOGS_FILE=${WORKSPACE}/archives/containers_logs/docker-compose.log
+docker-compose logs > ${COMPOSE_LOGS_FILE}
docker-compose down
docker-compose rm -f
-docker network rm ${CONTAINERS_NETWORK} \ No newline at end of file
+docker network rm ${CONTAINERS_NETWORK}
+
+if grep "LEAK:" ${COMPOSE_LOGS_FILE}; then
+ echo "Teardown failed. Memory leak detected in docker-compose logs."
+ exit 1
+fi
diff --git a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
index ab3b1e21d..9edad2cc2 100644
--- a/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
+++ b/test/csit/tests/dcaegen2-collectors-hv-ves/testcases/libraries/DcaeAppSimulatorLibrary.py
@@ -8,12 +8,12 @@ class DcaeAppSimulatorLibrary:
def configure_dcae_app_simulator_to_consume_messages_from_topics(self, app_url, topics):
logger.info("PUT at: " + app_url)
- resp = HttpRequests.session_without_env().put(app_url, data={'topics': topics}, timeout=5)
+ resp = HttpRequests.session_without_env().put(app_url, data={'topics': topics}, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
def assert_DCAE_app_consumed(self, app_url, expected_messages_amount):
logger.info("GET at: " + app_url)
- resp = HttpRequests.session_without_env().get(app_url, timeout=5)
+ resp = HttpRequests.session_without_env().get(app_url, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
assert resp.content == expected_messages_amount, \
@@ -21,7 +21,7 @@ class DcaeAppSimulatorLibrary:
def assert_DCAE_app_consumed_less_equal_than(self, app_url, messages_threshold):
logger.info("GET at: " + app_url)
- resp = HttpRequests.session_without_env().get(app_url, timeout=5)
+ resp = HttpRequests.session_without_env().get(app_url, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
logger.debug("Messages consumed by simulator: " + resp.content +
@@ -33,7 +33,7 @@ class DcaeAppSimulatorLibrary:
def reset_DCAE_app_simulator(self, app_url):
logger.info("DELETE at: " + app_url)
- resp = HttpRequests.session_without_env().delete(app_url, timeout=5)
+ resp = HttpRequests.session_without_env().delete(app_url, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)
def assert_DCAE_app_consumed_proper_messages(self, app_url, message_filepath):
@@ -42,5 +42,5 @@ class DcaeAppSimulatorLibrary:
data = file.read()
file.close()
- resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=5)
+ resp = HttpRequests.session_without_env().post(app_url, data=data, timeout=10)
HttpRequests.checkStatusCode(resp.status_code, DCAE_APP_NAME)