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
19f1f622
Verified
Commit
19f1f622
authored
2 years ago
by
Yaroslav Dynnikov
Browse files
Options
Downloads
Patches
Plain Diff
test: employ instance_uuid in pytest
Follow-up for
https://git.picodata.io/picodata/picodata/picodata/-/issues/50
parent
4aba385d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!107
test: employ instance_uuid in pytest
Pipeline
#4977
passed
2 years ago
Stage: build
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
test/int/test_joining.py
+23
-0
23 additions, 0 deletions
test/int/test_joining.py
with
23 additions
and
0 deletions
test/int/test_joining.py
+
23
−
0
View file @
19f1f622
...
...
@@ -78,6 +78,29 @@ def test_request_follower(cluster2: Cluster):
assert
e
.
value
.
args
==
(
"
ER_PROC_C
"
,
"
not a leader
"
)
def
test_instance_uuid
(
cluster2
:
Cluster
):
i1
,
i2
=
cluster2
.
instances
i1
.
assert_raft_status
(
"
Leader
"
)
ret
=
i1
.
call
(
"
.raft_join
"
,
i2
.
instance_id
,
None
,
# replicaset_id
i2
.
listen
,
# address
True
,
# voter
)[
0
][
"
peer
"
]
assert
ret
[
"
instance_id
"
]
==
i2
.
instance_id
assert
ret
[
"
instance_uuid
"
]
==
i2
.
eval
(
"
return box.info.uuid
"
)
# Two consequent requests must obtain same raft_id and instance_id
ret1
=
fake_join
(
i1
,
"
fake
"
,
timeout
=
1
)[
0
][
"
peer
"
]
ret2
=
fake_join
(
i1
,
"
fake
"
,
timeout
=
1
)[
0
][
"
peer
"
]
assert
ret1
[
"
instance_id
"
]
==
"
fake
"
assert
ret2
[
"
instance_id
"
]
==
"
fake
"
assert
ret1
[
"
raft_id
"
]
==
ret2
[
"
raft_id
"
]
assert
ret1
[
"
instance_uuid
"
]
==
ret2
[
"
instance_uuid
"
]
def
test_discovery
(
cluster
:
Cluster
):
cluster
.
deploy
(
instance_count
=
3
)
i1
,
i2
,
i3
=
cluster
.
instances
...
...
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