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
f581d051
Commit
f581d051
authored
10 years ago
by
Roman Tsisyk
Browse files
Options
Downloads
Patches
Plain Diff
Fix #320: box/bsdsocket.test.lua spountanously fails
parent
ea7e6e2c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/box/bsdsocket.result
+12
-4
12 additions, 4 deletions
test/box/bsdsocket.result
test/box/bsdsocket.test
+6
-6
6 additions, 6 deletions
test/box/bsdsocket.test
with
18 additions
and
10 deletions
test/box/bsdsocket.result
+
12
−
4
View file @
f581d051
...
...
@@ -516,11 +516,11 @@ lua aexitst( box.socket.getaddrinfo('localhost', 'http', { protocol = 'tcp', ty
---
- true
...
lua #(box.socket.getaddrinfo('
mail.ru
', 'http', {})) > 0
lua #(box.socket.getaddrinfo('
tarantool.org
', 'http', {})) > 0
---
- true
...
lua #(box.socket.getaddrinfo('
mail
12211alklkl.
ru
', 'http', {})) == 0
lua #(box.socket.getaddrinfo('
non-existing-domain-name-
12211alklkl.
com
', 'http', {})) == 0
---
- true
...
...
...
@@ -694,7 +694,7 @@ lua sc:close()
- true
...
tcp_connect
lua s = box.socket.tcp_connect('
mail.ru
', 80)
lua s = box.socket.tcp_connect('
tarantool.org
', 80)
---
...
lua string.match(tostring(s), ', aka') ~= nil
...
...
@@ -705,7 +705,7 @@ lua string.match(tostring(s), ', peer') ~= nil
---
- true
...
lua s:write('
GET
/ HTTP/1.0\r\nHost:
mail.ru
\r\n\r\n')
lua s:write('
HEAD
/ HTTP/1.0\r\nHost:
tarantool.org
\r\n\r\n')
---
- true
...
...
...
@@ -720,6 +720,14 @@ lua s:close()
---
- true
...
lua box.socket.tcp_connect('tarantool.org', 80, 0.00000000001)
---
- nil
...
lua box.socket.tcp_connect('tarantool.org', 12345)
---
- nil
...
lua s = box.socket.tcp_connect('127.0.0.1', box.cfg.primary_port)
---
...
...
...
This diff is collapsed.
Click to expand it.
test/box/bsdsocket.test
+
6
−
6
View file @
f581d051
...
...
@@ -162,8 +162,8 @@ if os.path.exists('/tmp/tarantool-test-socket'):
exec
admin
"lua function aexitst(ai, host, port) for i, a in pairs(ai) do if a.host == host and a.port == port then return true end end return false end"
exec
admin
"lua aexitst( box.socket.getaddrinfo('localhost', 'http', { protocol = 'tcp', type = 'SOCK_STREAM'}), '127.0.0.1', 80 )"
exec
admin
"lua #(box.socket.getaddrinfo('
mail.ru
', 'http', {})) > 0"
exec
admin
"lua #(box.socket.getaddrinfo('
mail
12211alklkl.
ru
', 'http', {})) == 0"
exec
admin
"lua #(box.socket.getaddrinfo('
tarantool.org
', 'http', {})) > 0"
exec
admin
"lua #(box.socket.getaddrinfo('
non-existing-domain-name-
12211alklkl.
com
', 'http', {})) == 0"
exec
admin
"lua sc = box.socket('PF_INET', 'SOCK_STREAM', 'tcp')"
exec
admin
"lua sc:getsockopt('SOL_SOCKET', 'SO_ERROR')"
...
...
@@ -217,17 +217,17 @@ exec admin "lua sc:close()"
print
(
"tcp_connect"
)
exec
admin
"lua s = box.socket.tcp_connect('
mail.ru
', 80)"
exec
admin
"lua s = box.socket.tcp_connect('
tarantool.org
', 80)"
exec
admin
"lua string.match(tostring(s), ', aka') ~= nil"
exec
admin
"lua string.match(tostring(s), ', peer') ~= nil"
exec
admin
"lua s:write('
GET
/ HTTP/1.0
\\
r
\\
nHost:
mail.ru
\\
r
\\
n
\\
r
\\
n')"
exec
admin
"lua s:write('
HEAD
/ HTTP/1.0
\\
r
\\
nHost:
tarantool.org
\\
r
\\
n
\\
r
\\
n')"
exec
admin
"lua header = s:readline(4000, { '
\\
n
\\
n', '
\\
r
\\
n
\\
r
\\
n' }, 1)"
exec
admin
"lua string.match(header, '
\\
r
\\
n
\\
r
\\
n$') ~= nil"
# exec admin "lua string.match(header, '200 [Oo][Kk]') ~= nil"
exec
admin
"lua s:close()"
#
exec admin "lua box.socket.tcp_connect('
mail.ru
', 80, 0.00000000001)"
#
exec admin "lua box.socket.tcp_connect('
mail.ru
', 12345)"
exec
admin
"lua box.socket.tcp_connect('
tarantool.org
', 80, 0.00000000001)"
exec
admin
"lua box.socket.tcp_connect('
tarantool.org
', 12345)"
exec
admin
"lua s = box.socket.tcp_connect('127.0.0.1', box.cfg.primary_port)"
...
...
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