Skip to content
Snippets Groups Projects
Commit 184208da authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge branch 'tt-merge-servers'

parents 47155fdc 8a7ce945
No related branches found
No related tags found
No related merge requests found
Showing
with 13 additions and 84 deletions
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
[default]
core = python tarantool
core = tarantool
description = tarantool/box, minimal configuration
config = tarantool.cfg
# put disabled tests here
#disabled = xlog.test
# disabled = lua.test
# put disabled in valgrind test here
valgrind_disabled = admin_coredump.test
release_disabled = errinj.test
File moved
[default]
core = lua tarantool
description = tarantool/box, minimal configuration, lua tests
config = tarantool.cfg
valgrind_disabled = admin_coredump.test
release_disabled = errinj.test
#
# Limit of memory used to store tuples to 100MB
# (0.1 GB)
# This effectively limits the memory, used by
# Tarantool. However, index and connection memory
# is stored outside the slab allocator, hence
# the effective memory usage can be higher (sometimes
# twice as high).
#
slab_alloc_arena = 0.1
#
# Store the pid in this file. Relative to
# startup dir.
#
pid_file = "box.pid"
#
# Pipe the logs into the following process.
#
logger="cat - >> tarantool.log"
#
# Read only and read-write port.
primary_port = 33013
# Read-only port.
secondary_port = 33014
#
# The port for administrative commands.
#
admin_port = 33015
#
# Each write ahead log contains this many rows.
# When the limit is reached, Tarantool closes
# the WAL and starts a new one.
rows_per_wal = 50
# Define a simple space with 1 HASH-based
# primary key.
space[0].enabled = 1
space[0].index[0].type = "HASH"
space[0].index[0].unique = 1
space[0].index[0].key_field[0].fieldno = 0
space[0].index[0].key_field[0].type = "NUM"
File moved
[default]
core = python tarantool
core = tarantool
description = tarantool/box connector C
config = cfg/tarantool.cfg
# put disabled tests here
......
File moved
File moved
File moved
......@@ -21,7 +21,9 @@ __author__ = "Konstantin Osipov <kostja.osipov@gmail.com>"
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
import socket
import pprint
import yaml
import sys
import re
......@@ -66,7 +68,8 @@ class AdminConnection(TarantoolConnection):
def execute_simple(self, command, silent, lua=False):
if not command:
return
self.socket.sendall(('lua ' if lua else '') + command.replace('\n', ' ') + ADMIN_SEPARATOR)
cmd = ('lua ' if lua else '') + command.replace('\n', ' ') + ADMIN_SEPARATOR
self.socket.sendall(cmd)
bufsiz = 4096
res = ""
......@@ -94,3 +97,10 @@ class AdminConnection(TarantoolConnection):
if (not rg1 or len(rg1.group()) != len(command)) and not rg2:
add_lua=True
return self.execute_simple(command, silent, lua=add_lua)
def __call__(self, command, silent=False, simple=False):
if not simple:
return self.execute(command, silent)
else:
self.opt_reconnect()
return self.execute_simple(command, silent)
import os
import sys
import glob
from server import Server
from test_suite import Test
from tarantool_server import TarantoolServer, FuncTest
class LuaTest(FuncTest):
def execute(self, server):
for i in open(self.name, 'r').read().replace('\n\n', '\n').split(';\n'):
server.admin(i)
class LuaTarantoolServer(TarantoolServer):
def __new__(cls, core="lua tarantool"):
return TarantoolServer.__new__(cls)
def __init__(self, core="lua tarantool"):
TarantoolServer.__init__(self, core)
def find_tests(self, test_suite, suite_path):
for test_name in sorted(glob.glob(os.path.join(suite_path, "*.test"))):
for test_pattern in test_suite.args.tests:
if test_name.find(test_pattern) != -1:
test_suite.tests.append(LuaTest(test_name, test_suite.args, test_suite.ini))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment