CI: Add unit test job with native threading

Add a py3-threading tox environment that runs
unit tests with OS_MANILA_DISABLE_EVENTLET_PATCHING=True,
using the native threading backend instead of eventlet.

Add a non-voting Zuul job (manila-tox-py3-threading)
to run this environment in the check
pipeline.

Skip eventlet wsgi tests when running with
the threading backend, as oslo_service.wsgi.Server
is not compatible with native threads.

Depends-On: https://review.opendev.org/c/openstack/manila/+/979036
Depends-On: https://review.opendev.org/c/openstack/manila/+/973519
Depends-On: https://review.opendev.org/c/openstack/manila/+/978967
Depends-On: https://review.opendev.org/c/openstack/manila/+/978966
Change-Id: I63cec8201e7f0ef0e095c787e31dab290136dbb3
Signed-off-by: Goutham Pacha Ravi <gouthampravi@gmail.com>
This commit is contained in:
Goutham Pacha Ravi
2026-03-04 13:48:03 -08:00
parent 8c4deea2a4
commit 93d64d74d9
4 changed files with 30 additions and 0 deletions
@@ -17,8 +17,10 @@
Provides common functionality for integrated unit tests
"""
import os
import random
import string
import unittest
from oslo_log import log
@@ -57,6 +59,10 @@ def generate_new_element(items, prefix, numeric=False):
LOG.debug("Random collision on %s.", candidate)
@unittest.skipIf(
os.environ.get('OS_MANILA_DISABLE_EVENTLET_PATCHING', '').lower()
in ('1', 'true', 'yes'),
'WSGIService is not compatible with the threading backend')
class _IntegratedTestBase(test.TestCase):
def setUp(self):
super(_IntegratedTestBase, self).setUp()
+6
View File
@@ -22,6 +22,8 @@ Unit Tests for remote procedure calls using queue
"""
from datetime import timedelta
import os
import unittest
from unittest import mock
import ddt
@@ -312,6 +314,10 @@ class ServiceTestCase(test.TestCase):
mock.ANY, service_ref_stopped['id'])
@unittest.skipIf(
os.environ.get('OS_MANILA_DISABLE_EVENTLET_PATCHING', '').lower()
in ('1', 'true', 'yes'),
'WSGIService is not compatible with the threading backend')
class TestWSGIService(test.TestCase):
def setUp(self):
+7
View File
@@ -23,6 +23,13 @@ commands =
passenv =
OS_MANILA_DISABLE_EVENTLET_PATCHING
[testenv:py3-threading]
setenv =
{[testenv]setenv}
OS_MANILA_DISABLE_EVENTLET_PATCHING=True
commands =
stestr run {posargs}
[testenv:releasenotes]
deps =
-c{env:TOX_CONSTRAINTS_FILE:https://releases.openstack.org/constraints/upper/master}
+11
View File
@@ -32,6 +32,8 @@
voting: false
- manila-tox-bandit:
voting: false
- manila-tox-py3-threading:
voting: false
# Test OpenAPI spec generation.
- codegenerator-openapi-shared-file-system-tips-with-api-ref:
voting: false
@@ -92,3 +94,12 @@
vars:
tox_envlist: bandit
irrelevant-files: *irrelevant-files
- job:
name: manila-tox-py3-threading
parent: openstack-tox-py313
description: |
Run unit tests with the native threading backend
(OS_MANILA_DISABLE_EVENTLET_PATCHING=True).
vars:
tox_envlist: py3-threading