From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7E29D221A5 for ; Tue, 8 May 2018 07:03:48 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v41QJEVHHV7m for ; Tue, 8 May 2018 07:03:48 -0400 (EDT) Received: from smtp47.i.mail.ru (smtp47.i.mail.ru [94.100.177.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 3EFFF21F9D for ; Tue, 8 May 2018 07:03:47 -0400 (EDT) From: Ilya Markov Subject: [tarantool-patches] [socket 1/1] socket: Fix socket test Date: Tue, 8 May 2018 14:03:24 +0300 Message-Id: <2b973c0584473750948f7e3b7e629d910faa1f57.1525777323.git.imarkov@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: georgy@tarantool.org Cc: tarantool-patches@freelists.org In sequential launch of app-tap/console.test, tests failed with "User exists" and binding errors. Make sockets path relative. Add users cleanup. Relates #3168 --- branch: gh-3168-fix-console-test test/app-tap/console.test.lua | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/test/app-tap/console.test.lua b/test/app-tap/console.test.lua index 48d28bd..fecfa52 100755 --- a/test/app-tap/console.test.lua +++ b/test/app-tap/console.test.lua @@ -7,12 +7,12 @@ local yaml = require('yaml') local fiber = require('fiber') local ffi = require('ffi') local log = require('log') +local fio = require('fio') --- Supress console log messages +-- Suppress console log messages log.level(4) - -local CONSOLE_SOCKET = '/tmp/tarantool-test-console.sock' -local IPROTO_SOCKET = '/tmp/tarantool-test-iproto.sock' +local CONSOLE_SOCKET = fio.pathjoin(fio.cwd(), 'tarantool-test-console.sock') +local IPROTO_SOCKET = fio.pathjoin(fio.cwd(), 'tarantool-test-iproto.sock') os.remove(CONSOLE_SOCKET) os.remove(IPROTO_SOCKET) @@ -64,7 +64,6 @@ box.cfg{ memtx_memory = 107374182, log="tarantool.log", } - -- Connect to iproto console (CALL) client:write(string.format("require('console').connect('/')\n")) -- error: Connection is not established @@ -242,8 +241,12 @@ server:close() box.session.on_connect(nil, console_on_connect) box.session.on_disconnect(nil, console_on_disconnect) box.session.on_auth(nil, console_on_auth) +box.schema.user.drop('test') +box.schema.user.drop('test2') session_id = nil triggers_ran = nil +os.remove(CONSOLE_SOCKET) +os.remove(IPROTO_SOCKET) test:check() -- 2.7.4