Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LOFAR2.0
tango
Commits
6a39b07e
Commit
6a39b07e
authored
Jul 8, 2022
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-846
: exclude devices that raise timeout error from integration test
parent
d3c0399c
No related branches found
No related tags found
2 merge requests
!384
Draft: Resolve L2SS-847 "Tango host in stats writer"
,
!374
Resolve L2SS-846: add disable_hardware to devices
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py
+18
-68
18 additions, 68 deletions
...n_test/default/devices/test_device_temperature_manager.py
with
18 additions
and
68 deletions
tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py
+
18
−
68
View file @
6a39b07e
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
from
.base
import
AbstractTestBases
from
.base
import
AbstractTestBases
from
tangostationcontrol.integration_test.device_proxy
import
TestDeviceProxy
from
tangostationcontrol.integration_test.device_proxy
import
TestDeviceProxy
from
tango._tango
import
DevState
from
tango._tango
import
DevState
from
tango
import
Dev
Failed
from
tango
import
Dev
iceProxy
import
time
import
time
...
@@ -21,12 +21,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -21,12 +21,7 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
def
setUp
(
self
):
def
setUp
(
self
):
"""
Intentionally recreate the device object in each test
"""
"""
Intentionally recreate the device object in each test
"""
self
.
recv_proxy
=
self
.
setup_recv_proxy
()
self
.
recv_proxy
=
self
.
setup_recv_proxy
()
self
.
sdp_proxy
=
self
.
setup_sdp_proxy
()
self
.
unb2_proxy
=
self
.
setup_unb2_proxy
()
self
.
apsct_proxy
=
self
.
setup_apsct_proxy
()
self
.
apspu_proxy
=
self
.
setup_apspu_proxy
()
super
().
setUp
(
"
STAT/TemperatureManager/1
"
)
super
().
setUp
(
"
STAT/TemperatureManager/1
"
)
self
.
proxy
.
put_property
({
"
Shutdown_Device_List
"
:
[
"
STAT/SDP/1
"
,
"
STAT/UNB2/1
"
,
"
STAT/RECV/1
"
,
"
STAT/APSCT/1
"
,
"
STAT/APSPU/1
"
]})
def
tearDown
(
self
):
def
tearDown
(
self
):
self
.
recv_proxy
.
stop_poll_attribute
(
"
HBAT_LED_on_RW
"
)
self
.
recv_proxy
.
stop_poll_attribute
(
"
HBAT_LED_on_RW
"
)
...
@@ -41,39 +36,24 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -41,39 +36,24 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
self
.
assertTrue
(
recv_proxy
.
is_attribute_polled
(
f
"
HBAT_LED_on_RW
"
))
self
.
assertTrue
(
recv_proxy
.
is_attribute_polled
(
f
"
HBAT_LED_on_RW
"
))
return
recv_proxy
return
recv_proxy
def
setup_sdp_proxy
(
self
):
sdp_proxy
=
TestDeviceProxy
(
"
STAT/SDP/1
"
)
sdp_proxy
.
off
()
sdp_proxy
.
warm_boot
()
sdp_proxy
.
set_defaults
()
return
sdp_proxy
def
setup_unb2_proxy
(
self
):
unb2_proxy
=
TestDeviceProxy
(
"
STAT/UNB2/1
"
)
unb2_proxy
.
off
()
unb2_proxy
.
warm_boot
()
unb2_proxy
.
set_defaults
()
return
unb2_proxy
def
setup_apsct_proxy
(
self
):
apsct_proxy
=
TestDeviceProxy
(
"
STAT/APSCT/1
"
)
apsct_proxy
.
off
()
apsct_proxy
.
warm_boot
()
apsct_proxy
.
set_defaults
()
return
apsct_proxy
def
setup_apspu_proxy
(
self
):
apspu_proxy
=
TestDeviceProxy
(
"
STAT/APSPU/1
"
)
apspu_proxy
.
off
()
apspu_proxy
.
warm_boot
()
apspu_proxy
.
set_defaults
()
return
apspu_proxy
def
test_alarm
(
self
):
def
test_alarm
(
self
):
self
.
proxy
.
off
()
self
.
proxy
.
off
()
self
.
proxy
.
initialise
()
self
.
proxy
.
initialise
()
self
.
proxy
.
on
()
self
.
proxy
.
on
()
# Exclude other devices which raise a TimeoutError, since they wait for the attribute *_translator_busy_R to become False
# (set instead to True in this test environment)
self
.
proxy
.
put_property
({
"
Shutdown_Device_List
"
:
[
"
STAT/SDP/1
"
,
"
STAT/APSPU/1
"
]})
devices
=
[
DeviceProxy
(
"
STAT/SDP/1
"
),
DeviceProxy
(
"
STAT/APSPU/1
"
)]
# make sure none of the devices are in the OFF or FAULT state. Any other state is fine
for
dev
in
devices
:
if
dev
.
state
()
==
DevState
.
OFF
:
dev
.
warm_boot
()
elif
dev
.
state
()
==
DevState
.
FAULT
:
dev
.
off
()
dev
.
warm_boot
()
# Here we trigger our own change event by just using an RW attribute
# Here we trigger our own change event by just using an RW attribute
self
.
recv_proxy
.
HBAT_LED_on_RW
=
[[
False
]
*
32
]
*
96
self
.
recv_proxy
.
HBAT_LED_on_RW
=
[[
False
]
*
32
]
*
96
time
.
sleep
(
2
)
time
.
sleep
(
2
)
...
@@ -86,41 +66,11 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -86,41 +66,11 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
# the TEMP_MANAGER_is_alarming_R should now be True, since it should have detected the temperature alarm.
# the TEMP_MANAGER_is_alarming_R should now be True, since it should have detected the temperature alarm.
self
.
assertTrue
(
self
.
proxy
.
is_alarming_R
)
self
.
assertTrue
(
self
.
proxy
.
is_alarming_R
)
def
test_shutdown
(
self
):
# make sure all the hardware devices are in the DISABLE state
recv_proxy
=
self
.
setup_recv_proxy
()
sdp_proxy
=
self
.
setup_sdp_proxy
()
unb2_proxy
=
self
.
setup_unb2_proxy
()
apsct_proxy
=
self
.
setup_apsct_proxy
()
apspu_proxy
=
self
.
setup_apspu_proxy
()
self
.
proxy
.
off
()
self
.
proxy
.
initialise
()
self
.
proxy
.
on
()
devices
=
[
sdp_proxy
,
recv_proxy
,
unb2_proxy
,
apsct_proxy
,
apspu_proxy
]
# make sure none of the devices are in the OFF or FAULT state. Any other state is fine
for
dev
in
devices
:
for
dev
in
devices
:
if
dev
.
state
()
==
DevState
.
OFF
:
self
.
assertEqual
(
DevState
.
DISABLE
,
dev
.
state
())
dev
.
warm_boot
()
elif
dev
.
state
()
==
DevState
.
FAULT
:
dev
.
off
()
dev
.
warm_boot
()
# toggle the attribute to make sure we get a change event to True
recv_proxy
.
HBAT_LED_on_RW
=
[[
False
]
*
32
]
*
96
recv_proxy
.
HBAT_LED_on_RW
=
[[
True
]
*
32
]
*
96
# sleeping here to make sure we've dealt with the above events
time
.
sleep
(
2
)
# make sure all the devices are in the DISABLE state
for
dev
in
devices
:
if
dev
.
name
().
lower
()
in
[
"
stat/sdp/1
"
,
"
stat/apspu/1
"
]:
self
.
assertEqual
(
DevState
.
DISABLE
,
dev
.
state
())
else
:
# Other device raise a TimeoutError since they wait for the attribute *_translator_busy_R to become False
# (set instead to True in this test environment)
self
.
assertRaises
(
DevFailed
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment