From 8f4cb68d31d8fe7907446c4d8ef4812ff6be83f3 Mon Sep 17 00:00:00 2001 From: Tom Hubrecht Date: Thu, 30 Jun 2022 10:00:29 +0200 Subject: [PATCH] Only run kf tests in sequential mode (to fix issues with channels) --- .gitlab-ci.yml | 10 +++++++++- kfet/open/tests.py | 1 - kfet/tests/test_views.py | 3 --- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5db3578d..f563e22c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -43,13 +43,21 @@ variables: # Keep this disabled for now, as it may kill GitLab... # coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' +kfettest: + stage: test + extends: .test_template + variables: + DJANGO_SETTINGS_MODULE: "gestioasso.settings.cof_prod" + script: + - coverage run manage.py kfet + coftest: stage: test extends: .test_template variables: DJANGO_SETTINGS_MODULE: "gestioasso.settings.cof_prod" script: - - coverage run manage.py test gestioncof bda kfet petitscours shared + - coverage run manage.py test gestioncof bda petitscours shared --parallel bdstest: stage: test diff --git a/kfet/open/tests.py b/kfet/open/tests.py index a30ecb99..295a8cd7 100644 --- a/kfet/open/tests.py +++ b/kfet/open/tests.py @@ -285,7 +285,6 @@ class OpenKfetScenarioTest(TestCase): def setUp(self): # Create channels to listen to messages channel_layer = get_channel_layer() - async_to_sync(channel_layer.flush)() self.channel = async_to_sync(channel_layer.new_channel)() self.team_channel = async_to_sync(channel_layer.new_channel)() diff --git a/kfet/tests/test_views.py b/kfet/tests/test_views.py index 153bb1b5..d7df91ad 100644 --- a/kfet/tests/test_views.py +++ b/kfet/tests/test_views.py @@ -1812,7 +1812,6 @@ class KPsulPerformOperationsViewTests(ViewTestCaseMixin, TestCase): # Create a channel to listen to KPsul's messages channel_layer = get_channel_layer() - async_to_sync(channel_layer.flush)() self.channel = async_to_sync(channel_layer.new_channel)() async_to_sync(channel_layer.group_add)("kfet.kpsul", self.channel) @@ -3242,8 +3241,6 @@ class KPsulCancelOperationsViewTests(ViewTestCaseMixin, TestCase): # Create a channel to listen to KPsul's messages channel_layer = get_channel_layer() - # Flush old messages - async_to_sync(channel_layer.flush)() self.channel = async_to_sync(channel_layer.new_channel)() async_to_sync(channel_layer.group_add)("kfet.kpsul", self.channel)