Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
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
Show more breadcrumbs
core
picodata
Commits
8752aef7
Commit
8752aef7
authored
2 years ago
by
Yaroslav Dynnikov
Committed by
Yaroslav Dynnikov
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
address review comments 2
parent
e130d4f7
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!112
fix: test running on macos
Pipeline
#5004
passed
2 years ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/conftest.py
+11
-3
11 additions, 3 deletions
test/int/conftest.py
with
11 additions
and
3 deletions
test/int/conftest.py
+
11
−
3
View file @
8752aef7
...
...
@@ -306,6 +306,7 @@ class Cluster:
data_dir
:
str
base_host
:
str
base_port
:
int
max_port
:
int
instances
:
list
[
Instance
]
=
field
(
default_factory
=
list
)
def
__repr__
(
self
):
...
...
@@ -341,6 +342,7 @@ class Cluster:
peers
=
peers
or
[
f
"
{
self
.
base_host
}
:
{
self
.
base_port
+
1
}
"
],
)
assert
self
.
base_port
<=
instance
.
port
<=
self
.
max_port
self
.
instances
.
append
(
instance
)
if
wait_ready
:
...
...
@@ -379,15 +381,21 @@ def binary_path(compile) -> str:
@pytest.fixture
def
cluster
(
binary_path
,
tmpdir
,
worker_id
)
->
Generator
[
Cluster
,
None
,
None
]:
base_port
=
3300
+
100
*
xdist_worker_number
(
worker_id
)
assert
isinstance
(
base_port
,
int
)
assert
3300
<=
base_port
<=
65535
n
=
xdist_worker_number
(
worker_id
)
assert
isinstance
(
n
,
int
)
assert
n
>=
0
# Provide each worker a dedicated pool of 100 listening ports
base_port
=
3300
+
n
*
100
max_port
=
base_port
+
99
assert
max_port
<=
65535
cluster
=
Cluster
(
binary_path
=
binary_path
,
data_dir
=
tmpdir
,
base_host
=
"
127.0.0.1
"
,
base_port
=
base_port
,
max_port
=
max_port
,
)
yield
cluster
cluster
.
terminate
()
...
...
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