[PATCH] test: fix unix socket conflict in socket.test.lua
Vladimir Davydov
vdavydov.dev at gmail.com
Thu Oct 25 12:43:39 MSK 2018
On Thu, Oct 25, 2018 at 05:21:45AM +0300, Alexander Turenko wrote:
> It is needed to run the test in parallel on several test-run workers to
> investigate flaky failures of the test.
I don't think I understand. Do you mean that this test doesn't fix the
test flakiness and is only needed for further investigation?
> diff --git a/test/app/socket.result b/test/app/socket.result
> index 2f002a37e..1a570b9fa 100644
> --- a/test/app/socket.result
> +++ b/test/app/socket.result
> @@ -42,6 +42,29 @@ test_run:cmd("push filter '(error: .builtin/.*[.]lua):[0-9]+' to '\\1'")
> ---
> - true
> ...
> +test_run:cmd("push filter '(/tmp/tarantool-test-socket)-[0-9]+' to '\\1'")
> +---
> +- true
> +...
> +-- /tmp/tarantool-test-socket-${TEST_RUN_WORKER_ID}
> +test_run:cmd("setopt delimiter ';'")
> +---
> +- true
> +...
> +function get_temp_socket_path()
> + local base_path = '/tmp/tarantool-test-socket'
> + local worker_id = os.getenv('TEST_RUN_WORKER_ID')
> + if not worker_id then
> + return base_path
> + end
> + return ('%s-%s'):format(base_path, worker_id)
> +end;
Why don't you simply create the file in the worker directory?
More information about the Tarantool-patches
mailing list