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
a9501be1
Commit
a9501be1
authored
1 year ago
by
Georgy Moshkin
Browse files
Options
Downloads
Patches
Plain Diff
test: check vshard is reconfigured upon incarnation change
parent
bc97d2cb
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!735
Gmoshkin/minor fixes
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/conftest.py
+5
-1
5 additions, 1 deletion
test/conftest.py
test/int/test_sharding.py
+22
-0
22 additions, 0 deletions
test/int/test_sharding.py
with
27 additions
and
1 deletion
test/conftest.py
+
5
−
1
View file @
a9501be1
...
...
@@ -832,7 +832,9 @@ class Instance:
"
leader_id
"
:
status
.
leader_id
,
}
==
{
"
raft_state
"
:
state
,
"
leader_id
"
:
leader_id
}
def
wait_online
(
self
,
timeout
:
int
|
float
=
6
,
rps
:
int
|
float
=
5
):
def
wait_online
(
self
,
timeout
:
int
|
float
=
6
,
rps
:
int
|
float
=
5
,
expected_incarnation
=
None
):
"""
Wait until instance attains Online grade
Args:
...
...
@@ -869,6 +871,8 @@ class Instance:
assert
isinstance
(
myself
,
dict
)
assert
isinstance
(
myself
[
"
current_grade
"
],
dict
)
assert
myself
[
"
current_grade
"
][
"
variant
"
]
==
"
Online
"
if
expected_incarnation
is
not
None
:
assert
myself
[
"
current_grade
"
][
"
incarnation
"
]
==
expected_incarnation
Retriable
(
timeout
,
rps
,
fatal
=
ProcessDead
).
call
(
fetch_info
)
eprint
(
f
"
{
self
}
is online
"
)
...
...
This diff is collapsed.
Click to expand it.
test/int/test_sharding.py
0 → 100644
+
22
−
0
View file @
a9501be1
from
conftest
import
(
Cluster
,
)
def
test_sharding_reinitializes_on_restart
(
cluster
:
Cluster
):
[
i1
]
=
cluster
.
deploy
(
instance_count
=
1
)
assert
i1
.
call
(
"
vshard.router.info
"
)
is
not
None
incarnation
=
i1
.
eval
(
"
return pico.instance_info().current_grade.incarnation
"
)
# Instance silently dies without it's grade being updated
i1
.
kill
()
# Instance restarts, it's incarnation is updated and governor reconfigures
# all the subsystems
i1
.
start
()
i1
.
wait_online
(
expected_incarnation
=
incarnation
+
1
)
# Vshard is configured even though the configuration didn't change
assert
i1
.
call
(
"
vshard.router.info
"
)
is
not
None
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