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
4f2502b1
Commit
4f2502b1
authored
Jul 8, 2022
by
Stefano Di Frischia
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-846
: fix integration test
parent
6e667c75
Branches
Branches containing commit
Tags
Tags containing commit
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
+45
-8
45 additions, 8 deletions
...n_test/default/devices/test_device_temperature_manager.py
with
45 additions
and
8 deletions
tangostationcontrol/tangostationcontrol/integration_test/default/devices/test_device_temperature_manager.py
+
45
−
8
View file @
4f2502b1
...
@@ -21,8 +21,12 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -21,8 +21,12 @@ 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
"
)
...
@@ -37,6 +41,34 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -37,6 +41,34 @@ 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
()
...
@@ -55,22 +87,28 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -55,22 +87,28 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
self
.
assertTrue
(
self
.
proxy
.
is_alarming_R
)
self
.
assertTrue
(
self
.
proxy
.
is_alarming_R
)
def
test_shutdown
(
self
):
def
test_shutdown
(
self
):
self
.
setup_recv_proxy
()
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
.
off
()
self
.
proxy
.
initialise
()
self
.
proxy
.
initialise
()
self
.
proxy
.
on
()
self
.
proxy
.
on
()
devices
=
[
DeviceProxy
(
"
STAT/SDP/1
"
),
DeviceProxy
(
"
STAT/UNB2/1
"
),
DeviceProxy
(
"
STAT/RECV/1
"
),
devices
=
[
sdp_proxy
,
recv_proxy
,
unb2_proxy
,
apsct_proxy
,
apspu_proxy
]
DeviceProxy
(
"
STAT/APSCT/1
"
),
DeviceProxy
(
"
STAT/APSPU/1
"
)]
# make sure none of the devices are in the OFF state. Any other state is fine
# 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
:
if
dev
.
state
()
==
DevState
.
OFF
:
dev
.
warm_boot
()
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
# toggle the attribute to make sure we get a change event to True
self
.
recv_proxy
.
HBAT_LED_on_RW
=
[[
False
]
*
32
]
*
96
recv_proxy
.
HBAT_LED_on_RW
=
[[
False
]
*
32
]
*
96
self
.
recv_proxy
.
HBAT_LED_on_RW
=
[[
True
]
*
32
]
*
96
recv_proxy
.
HBAT_LED_on_RW
=
[[
True
]
*
32
]
*
96
# sleeping here to make sure we've dealt with the above events
# sleeping here to make sure we've dealt with the above events
time
.
sleep
(
2
)
time
.
sleep
(
2
)
...
@@ -78,7 +116,6 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
...
@@ -78,7 +116,6 @@ class TestDeviceTemperatureManager(AbstractTestBases.TestDeviceBase):
# make sure all the devices are in the DISABLE state
# make sure all the devices are in the DISABLE state
for
dev
in
devices
:
for
dev
in
devices
:
if
dev
.
name
().
lower
()
in
[
"
stat/sdp/1
"
,
"
stat/apspu/1
"
]:
if
dev
.
name
().
lower
()
in
[
"
stat/sdp/1
"
,
"
stat/apspu/1
"
]:
time
.
sleep
(
1
)
self
.
assertEqual
(
DevState
.
DISABLE
,
dev
.
state
())
self
.
assertEqual
(
DevState
.
DISABLE
,
dev
.
state
())
else
:
else
:
# Other device raise a TimeoutError since they wait for the attribute *_translator_busy_R to become False
# Other device raise a TimeoutError since they wait for the attribute *_translator_busy_R to become False
...
...
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