Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
b4e6fa8b
Commit
b4e6fa8b
authored
3 years ago
by
Jorrit Schaap
Browse files
Options
Downloads
Patches
Plain Diff
TMSS-1144
: test should not depend on previous cache contents
parent
9cb7caad
No related branches found
No related tags found
1 merge request
!635
Resolve TMSS-1144
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/TMSS/backend/test/t_adapter.py
+20
-1
20 additions, 1 deletion
SAS/TMSS/backend/test/t_adapter.py
with
20 additions
and
1 deletion
SAS/TMSS/backend/test/t_adapter.py
+
20
−
1
View file @
b4e6fa8b
...
...
@@ -64,7 +64,7 @@ from lofar.sas.tmss.tmss.workflowapp.models.schedulingunitflow import Scheduling
from
lofar.sas.tmss.tmss.exceptions
import
SubtaskInvalidStateException
from
lofar.sas.tmss.tmss.tmssapp.adapters.parset
import
convert_to_parset
,
convert_to_parset_dict
from
lofar.common.json_utils
import
get_default_json_object_for_schema
,
add_defaults_to_json_object_for_schema
from
lofar.sas.tmss.tmss.tmssapp.adapters.sip
import
generate_sip_for_dataproduct
from
lofar.sas.tmss.tmss.tmssapp.adapters.sip
import
generate_sip_for_dataproduct
,
create_sip_representation_for_dataproduct
from
lofar.lta.sip
import
constants
from
lofar.sas.tmss.test.test_utils
import
set_subtask_state_following_allowed_transitions
...
...
@@ -331,6 +331,8 @@ class SIPadapterTest(unittest.TestCase):
dataproduct
.
sap
=
sap
dataproduct
.
save
()
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# double-check that SIP contains values from feedback and specifications docs
...
...
@@ -352,6 +354,9 @@ class SIPadapterTest(unittest.TestCase):
# alter dataproduct, recreate sip
dataproduct
.
specifications_doc
[
'
coherent
'
]
=
False
dataproduct
.
save
()
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# assert we get an incoherent stokes beam
...
...
@@ -360,6 +365,9 @@ class SIPadapterTest(unittest.TestCase):
# alter dataproduct, recreate sip
dataproduct
.
feedback_doc
[
'
antennas
'
][
'
fields
'
]
=
[{
'
type
'
:
'
HBA
'
,
'
field
'
:
'
HBA0
'
,
'
station
'
:
'
CS001
'
}]
dataproduct
.
save
()
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# assert we get a flyseye beam if we have a single antenna field
...
...
@@ -401,6 +409,8 @@ class SIPadapterTest(unittest.TestCase):
# PULP ANALYSIS
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# double-check that SIP contains values from feedback and specifications docs
...
...
@@ -428,6 +438,9 @@ class SIPadapterTest(unittest.TestCase):
# alter dataproduct, recreate sip
dataproduct
.
feedback_doc
[
'
target
'
][
'
coherent
'
]
=
False
dataproduct
.
save
()
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# assert datatype reflects change of coherent flag
...
...
@@ -439,6 +452,9 @@ class SIPadapterTest(unittest.TestCase):
dataproduct
.
dataformat
=
models
.
Dataformat
.
objects
.
get
(
value
=
"
pulp summary
"
)
dataproduct
.
feedback_doc
[
'
$schema
'
]
=
'
http://127.0.0.1:8001/api/schemas/dataproductfeedbacktemplate/pulp summary/1#
'
dataproduct
.
save
()
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
sip
=
generate_sip_for_dataproduct
(
dataproduct
)
# assert datatype reflects change of dataformat
...
...
@@ -514,6 +530,9 @@ class SIPadapterTest(unittest.TestCase):
dataproduct
.
save
()
main_dataproducts
.
append
(
dataproduct
)
# wipe cache and regenerate
create_sip_representation_for_dataproduct
.
cache_clear
()
# create their SIPs (separate loop since dataproduct.save() will invalidate cache):
for
i
in
range
(
10
):
dataproduct
=
main_dataproducts
[
i
]
...
...
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