Skip to content
Snippets Groups Projects
Commit cc3fc7fa authored by Jorrit Schaap's avatar Jorrit Schaap
Browse files

Merge branch 'L2SS-1448' into 'main'

L2SS-1448: Increase timeout for functionality testing

Closes L2SS-1448

See merge request !85
parents 05c4d0a4 4ddaa350
Branches
Tags v0.18.5
1 merge request!85L2SS-1448: Increase timeout for functionality testing
Pipeline #70443 failed
......@@ -131,6 +131,7 @@ tox -e debug tests.requests.test_prometheus
## Release notes
- 0.18.5 - Compatability with python 3.10 and higher
- 0.18.4 - Compatability with PyTango 9.5.0
- 0.18.3 - Refactoring statistics packets. Moving tango to optional dependency `[tango]`
- 0.18.2 - Bugfix when closing unused HDF5 files
......
0.18.3
0.18.5
......@@ -14,7 +14,6 @@
import unittest
import testscenarios
import asynctest
class BaseTestCase(testscenarios.WithScenarios, unittest.TestCase):
......@@ -31,7 +30,7 @@ class TestCase(BaseTestCase):
super().setUp()
class AsyncTestCase(testscenarios.WithScenarios, asynctest.TestCase):
class AsyncTestCase(testscenarios.WithScenarios, unittest.IsolatedAsyncioTestCase):
"""Test case base class for all asyncio unit tests."""
def setUp(self):
......
......@@ -64,6 +64,8 @@ class StationObservationFuture:
self._control_proxy = DeviceProxy(
f"tango://{self.host}/{OBSERVATION_CONTROL_DEVICE_NAME}"
)
# Increase timeout
self._control_proxy.set_timeout_millis(10000)
# gives an exception when it fails to ping the proxy
_ = self._control_proxy.ping()
......@@ -136,12 +138,13 @@ class StationObservationFuture:
for observation_field in self._specification["antenna_fields"]:
antenna_field = observation_field["antenna_field"]
self._antenna_fields.append(antenna_field)
self._observation_field_proxies.append(
DeviceProxy(
field_proxy = DeviceProxy(
f"tango://{self.host}/{OBSERVATION_FIELD_DEVICE_NAME}/"
f"{self._id}-{antenna_field}"
)
)
# Increase timeout
field_proxy.set_timeout_millis(10000)
self._observation_field_proxies.append(field_proxy)
except DevFailed as ex:
self._observation_field_proxies = None
raise ex
......
......@@ -19,8 +19,6 @@ classifiers =
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
......@@ -31,7 +29,7 @@ classifiers =
[options]
include_package_data = true
packages = find:
python_requires = >=3.7
python_requires = >=3.9
install_requires = file: requirements.txt
[options.extras_require]
......
......@@ -6,7 +6,6 @@ autopep8>=1.7.0 # MIT
coverage!=4.4,>=4.0 # Apache-2.0
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
asynctest>=0.13.0 # Apache-2.0
testscenarios>=0.5.0 # Apache-2.0/BSD
pytz>=2022.6 # MIT
psutil>=5.9.4 # BSD
......
......@@ -14,7 +14,6 @@
import unittest
import testscenarios
import asynctest
class BaseTestCase(testscenarios.WithScenarios, unittest.TestCase):
......@@ -31,7 +30,7 @@ class TestCase(BaseTestCase):
super().setUp()
class AsyncTestCase(testscenarios.WithScenarios, asynctest.TestCase):
class AsyncTestCase(testscenarios.WithScenarios, unittest.IsolatedAsyncioTestCase):
"""Test case base class for all asyncio unit tests."""
def setUp(self):
......
[tox]
min_version = 4.3.3
# Generative environment list to test all supported Python versions
envlist = black,pep8,pylint,py3{7,8,9,10,11,12},docs
envlist = black,pep8,pylint,py3{9,10,11,12},docs
[testenv]
usedevelop = True
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment