Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
tarantool
Commits
713c3943
Commit
713c3943
authored
9 years ago
by
Sulverus
Browse files
Options
Downloads
Patches
Plain Diff
Space crash test
parent
31242315
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/box/space_crash.result
+29
-0
29 additions, 0 deletions
test/box/space_crash.result
test/box/space_crash.test.py
+46
-0
46 additions, 0 deletions
test/box/space_crash.test.py
with
75 additions
and
0 deletions
test/box/space_crash.result
0 → 100644
+
29
−
0
View file @
713c3943
#
# A test case for: http://bugs.launchpad.net/bugs/712456
# Verify that when trying to access a non-existing or
# very large space id, no crash occurs.
#
---
- error:
errcode: (36)
errmsg: Space '1' does not exist
...
---
- error:
errcode: (36)
errmsg: Space '65537' does not exist
...
---
- error:
errcode: (36)
errmsg: Space '4294967295' does not exist
...
#
# A test case for: http://bugs.launchpad.net/bugs/716683
# Admin console should not stall on unknown command.
show status
---
- error: '[string "show status"]:1: ''='' expected near ''status'''
...
This diff is collapsed.
Click to expand it.
test/box/space_crash.test.py
0 → 100644
+
46
−
0
View file @
713c3943
from
lib.utils
import
check_libs
check_libs
()
from
tarantool.request
import
RequestSelect
errstr
=
"""
---
- error:
errcode: {0}
errmsg: {1}
...
"""
def
format_error
(
response
):
return
errstr
.
format
(
"
(%d)
"
%
response
.
return_code
,
response
.
return_message
)
def
format_yamllike
(
response
):
table
=
(
"
\n
"
+
"
\n
"
.
join
([
"
-
"
+
str
(
list
(
k
))
for
k
in
response
]))
\
if
len
(
response
)
else
""
return
"
---{0}
\n
...
"
.
format
(
table
)
def
select
(
conn
,
space_no
,
index_no
,
key
,
offset
=
0
,
limit
=
0
,
iterator
=
0
):
data
=
RequestSelect
(
conn
,
space_no
,
index_no
,
key
,
offset
,
limit
,
iterator
)
response
=
conn
.
_send_request
(
data
)
if
response
.
return_code
:
return
format_error
(
response
)
return
format_yamllike
(
response
)
print
"""
#
# A test case for: http://bugs.launchpad.net/bugs/712456
# Verify that when trying to access a non-existing or
# very large space id, no crash occurs.
#
"""
print
select
(
iproto
.
py_con
,
1
,
0
,
[
0
])
print
select
(
iproto
.
py_con
,
65537
,
0
,
[
0
])
print
select
(
iproto
.
py_con
,
4294967295
,
0
,
[
0
])
print
"""
#
# A test case for: http://bugs.launchpad.net/bugs/716683
# Admin console should not stall on unknown command.
"""
admin
(
"
show status
"
,
simple
=
True
)
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