Skip to content

Commit 12155ea

Browse files
committed
Use only Unix sockets for admin console connection
This patch makes test-run use only Unix sockets for admin console connection. The feature to use TCP sockets for it is dropped. Actually, admin console connection is a purely internal thing of test-run, and we can use what is more convenient for such a connection. Using only Unix sockets gives us significant advantages over TCP sockets like connection speed and eliminating issue with getting a free port for TCP connection. Part of #141
1 parent b59464f commit 12155ea

File tree

5 files changed

+8
-12
lines changed

5 files changed

+8
-12
lines changed

lib/preprocessor.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,6 @@ def server_create(self, ctype, sname, opts):
259259
if 'rpl_master' in opts:
260260
temp.rpl_master = self.servers[opts['rpl_master']]
261261
temp.vardir = self.suite_ini['vardir']
262-
temp.use_unix_sockets = self.suite_ini['use_unix_sockets']
263262
temp.use_unix_sockets_iproto = \
264263
self.suite_ini['use_unix_sockets_iproto']
265264
temp.inspector_port = int(self.suite_ini.get(

lib/tarantool_server.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import signal
1111
import subprocess
1212
import sys
13+
import textwrap
1314
import time
1415
import yaml
1516

@@ -655,12 +656,15 @@ def __init__(self, _ini=None, test_suite=None):
655656
'lua_libs': [],
656657
'valgrind': False,
657658
'vardir': None,
658-
'use_unix_sockets': False,
659659
'use_unix_sockets_iproto': False,
660660
'tarantool_port': None,
661661
'strace': False
662662
}
663663
ini.update(_ini)
664+
if ini.get('use_unix_sockets') is not None:
665+
qa_notice(textwrap.fill('The "use_unix_sockets" option is defined '
666+
'in suite.ini, but it was dropped in favor '
667+
'of permanent using Unix sockets'))
664668
Server.__init__(self, ini, test_suite)
665669
self.testdir = os.path.abspath(os.curdir)
666670
self.sourcedir = os.path.abspath(os.path.join(os.path.basename(
@@ -677,7 +681,6 @@ def __init__(self, _ini=None, test_suite=None):
677681
self.lua_libs = ini['lua_libs']
678682
self.valgrind = ini['valgrind']
679683
self.strace = ini['strace']
680-
self.use_unix_sockets = ini['use_unix_sockets']
681684
self.use_unix_sockets_iproto = ini['use_unix_sockets_iproto']
682685
self._start_against_running = ini['tarantool_port']
683686
self.crash_detector = None
@@ -762,12 +765,9 @@ def install(self, silent=True):
762765
self.cleanup()
763766
self.copy_files()
764767

765-
if self.use_unix_sockets:
766-
path = os.path.join(self.vardir, self.name + ".c")
767-
warn_unix_socket(path)
768-
self._admin = path
769-
else:
770-
self._admin = find_port()
768+
path = os.path.join(self.vardir, self.name + ".c")
769+
warn_unix_socket(path)
770+
self._admin = path
771771

772772
if self.use_unix_sockets_iproto:
773773
path = os.path.join(self.vardir, self.name + ".i")

lib/test_suite.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ def __init__(self, suite_path, args):
140140
# use old format dictionary
141141
self.fragile['tests'] = self.ini['fragile']
142142

143-
self.parse_bool_opt('use_unix_sockets', False)
144143
self.parse_bool_opt('use_unix_sockets_iproto', False)
145144
self.parse_bool_opt('is_parallel', False)
146145
self.parse_bool_opt('show_reproduce_content', True)

test/test-tarantool/suite.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
core = tarantool
33
description = tarantool tests
44
script = box.lua
5-
use_unix_sockets = True
65
config = engine.cfg

test/unittest/suite.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,4 @@
22
core = tarantool
33
description = unit tests
44
script = box-cc0544b6afd1.lua
5-
use_unix_sockets = True
65
use_unix_sockets_iproto = True

0 commit comments

Comments
 (0)