Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
csp-lmc-old
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Gianluca Marotta
csp-lmc-old
Merge requests
!16
Resolve CT-215
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Resolve CT-215
CT-215
into
master
Overview
0
Commits
11
Pipelines
1
Changes
1
Merged
Gianluca Marotta
requested to merge
CT-215
into
master
4 years ago
Overview
0
Commits
11
Pipelines
1
Changes
1
Expand
Closes CT-215
Edited
4 years ago
by
Gianluca Marotta
0
0
Merge request reports
Viewing commit
37e69ce0
Prev
Next
Show latest version
1 file
+
33
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
37e69ce0
CT-215 Firt test implemented for re-initialization: after resourcing
· 37e69ce0
Gianluca Marotta
authored
4 years ago
csp-lmc-mid/tests/integration/MidCspSubarray_test.py
+
33
−
1
Options
@@ -188,6 +188,36 @@ class TestCspSubarray(TestBase):
Poller
(
4
,
0.2
).
check
(
prober_subarray_state
)
prober_subarray_obsstate
=
Probe
(
self
.
midcsp_subarray01
,
"
obsState
"
,
ObsState
.
EMPTY
,
f
"
CSP Subarray not EMPTY
"
)
Poller
(
4
,
0.2
).
check
(
prober_subarray_obsstate
)
def
test_re_initialization_AFTER_resourcing
(
self
):
"""
Test for re-initialization of mid-csp device after killing the Tango device.
The CspSubarray align to the state/obsstate of CBFSubarray: ON/IDLE
"""
self
.
_setup_subarray
()
json_config
=
self
.
_build_resources
([
1
,
2
])
self
.
midcsp_subarray01
.
AssignResources
(
json_config
)
prober_subarray_obsstate
=
Probe
(
self
.
midcsp_subarray01
,
"
obsState
"
,
ObsState
.
IDLE
,
f
"
CSP Subarray not IDLE
"
)
# open a proxy to the adminstrative server
dserver_proxy
=
tango
.
DeviceProxy
(
self
.
midcsp_subarray01
.
adm_name
())
dserver_proxy
.
devrestart
(
'
mid_csp/elt/subarray_01
'
)
"""
timeout = 60
starting_time = time.time()
while (time.time() - starting_time)<timeout:
try:
dserver_proxy.state()
break
except:
pass
"""
prober_subarray_state
=
Probe
(
self
.
midcsp_subarray01
,
"
State
"
,
DevState
.
ON
,
f
"
CSP Subarray not ON after re-initialization
"
)
Poller
(
10
,
0.2
).
check
(
prober_subarray_state
)
prober_subarray_obsstate
=
Probe
(
self
.
midcsp_subarray01
,
"
obsState
"
,
ObsState
.
IDLE
,
f
"
CSP Subarray not IDLE after re-initialization
"
)
Poller
(
4
,
0.2
).
check
(
prober_subarray_obsstate
)
def
test_subarray_state_AFTER_on_command_execution
(
self
):
@@ -218,6 +248,7 @@ class TestCspSubarray(TestBase):
prober_subarray_obsstate
=
Probe
(
self
.
midcsp_subarray01
,
"
obsState
"
,
ObsState
.
EMPTY
,
f
"
CSP Subarray not EMPTY
"
)
Poller
(
4
,
0.2
).
check
(
prober_subarray_obsstate
)
receptors
=
self
.
midcsp_subarray01
.
assignedReceptors
LOGGER
.
info
(
f
'
list of receptors
{
receptors
}
'
)
assert
not
receptors
.
any
(),
f
"
CSP Subarray is not empty
"
def
test_OffCommand_after_IDLE
(
self
):
@@ -266,7 +297,8 @@ class TestCspSubarray(TestBase):
Poller
(
10
,
0.2
).
check
(
prober_subarray_obsstate
)
receptors
=
self
.
midcsp_subarray01
.
assignedReceptors
assert
not
receptors
.
any
(),
f
"
CSP Subarray is not empty
"
@pytest.mark.off
def
test_OffCommand_after_SCANNING
(
self
):
"""
Test that the Off command send the device in OFF-EMPTY
Loading