Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
58173b90
Commit
58173b90
authored
Nov 27, 2019
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERP5] Task Distribution: no need to fetch full catalog result when looking for 2 results
parent
9d356026
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletion
+4
-1
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
+3
-1
product/ERP5/Tool/TaskDistributionTool.py
product/ERP5/Tool/TaskDistributionTool.py
+1
-0
No files found.
product/ERP5/Document/ERP5ProjectUnitTestDistributor.py
View file @
58173b90
...
@@ -429,6 +429,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -429,6 +429,7 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_node_list
=
self
.
_getTestNodeModule
().
searchFolder
(
test_node_list
=
self
.
_getTestNodeModule
().
searchFolder
(
portal_type
=
"Test Node"
,
portal_type
=
"Test Node"
,
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
node_title
),
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
node_title
),
limit
=
2
)
)
assert
len
(
test_node_list
)
==
1
,
"We found %i test nodes for %s"
%
(
assert
len
(
test_node_list
)
==
1
,
"We found %i test nodes for %s"
%
(
len
(
test_node_list
),
node_title
)
len
(
test_node_list
),
node_title
)
...
@@ -439,7 +440,8 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
...
@@ -439,7 +440,8 @@ class ERP5ProjectUnitTestDistributor(XMLObject):
test_suite_list
=
self
.
_getTestSuiteModule
().
searchFolder
(
test_suite_list
=
self
.
_getTestSuiteModule
().
searchFolder
(
portal_type
=
'Test Suite'
,
portal_type
=
'Test Suite'
,
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
suite_title
),
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
suite_title
),
validation_state
=
'validated'
)
validation_state
=
'validated'
,
limit
=
2
)
assert
len
(
test_suite_list
)
<=
1
,
"We found %i test suite for %s"
%
(
assert
len
(
test_suite_list
)
<=
1
,
"We found %i test suite for %s"
%
(
len
(
test_suite_list
),
suite_title
)
len
(
test_suite_list
),
suite_title
)
test_suite
=
None
test_suite
=
None
...
...
product/ERP5/Tool/TaskDistributionTool.py
View file @
58173b90
...
@@ -59,6 +59,7 @@ class TaskDistributionTool(BaseTool):
...
@@ -59,6 +59,7 @@ class TaskDistributionTool(BaseTool):
test_node_list
=
portal
.
portal_catalog
(
test_node_list
=
portal
.
portal_catalog
(
portal_type
=
"Test Node"
,
portal_type
=
"Test Node"
,
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
node_title
),
title
=
SimpleQuery
(
comparison_operator
=
'='
,
title
=
node_title
),
limit
=
2
)
)
if
len
(
test_node_list
)
==
1
:
if
len
(
test_node_list
)
==
1
:
return
test_node_list
[
0
].
getRelativeUrl
()
return
test_node_list
[
0
].
getRelativeUrl
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment