{"id":27294016,"url":"https://github.com/igorcoding/test-tarantool16","last_synced_at":"2025-04-11T22:45:37.116Z","repository":{"id":33281460,"uuid":"36926129","full_name":"igorcoding/Test-Tarantool16","owner":"igorcoding","description":"Tarantool 1.6 runner for tests","archived":false,"fork":false,"pushed_at":"2016-12-01T16:26:06.000Z","size":29,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-20T00:11:03.670Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/igorcoding.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-06-05T10:10:25.000Z","updated_at":"2016-12-01T16:22:50.000Z","dependencies_parsed_at":"2022-08-17T19:05:47.538Z","dependency_job_id":null,"html_url":"https://github.com/igorcoding/Test-Tarantool16","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorcoding%2FTest-Tarantool16","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorcoding%2FTest-Tarantool16/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorcoding%2FTest-Tarantool16/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/igorcoding%2FTest-Tarantool16/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/igorcoding","download_url":"https://codeload.github.com/igorcoding/Test-Tarantool16/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492963,"owners_count":21113160,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-04-11T22:45:36.477Z","updated_at":"2025-04-11T22:45:37.078Z","avatar_url":"https://github.com/igorcoding.png","language":"Perl","readme":"NAME\n    Test::Tarantool16 - The Swiss army knife for tests of Tarantool 1.6\n    related Perl and lua code.\n\nVERSION\n    Version 0.033\n\nSYNOPSIS\n        use Test::Tarantool16;\n        use AnyEvent;\n\n        # Clear data and exit on Ctrl+C.\n        my $w = AnyEvent-\u003esignal (signal =\u003e \"INT\", cb =\u003e sub { exit 0 });\n\n        my @shards = map {\n            my $n = $_;\n            Test::Tarantool16-\u003enew(\n                host =\u003e '127.17.3.0',\n                initlua =\u003e do {\n                              open my $f, '\u003c', 'init.lua';\n                              local $/ = undef;\n                              \u003c$f\u003e or \"\";\n                           },\n                on_die =\u003e sub { warn \"Shard #$n unexpectedly terminated\\n\"; exit; },\n            );\n        } 1..4;\n\n        my @cluster = map { [ $_-\u003e{host}, $_-\u003e{p_port} ] } @shards;\n\n        {\n            my $cv = AE::cv();\n            $cv-\u003ebegin for (@shards);\n            $_-\u003estart($cv) for (@shards);\n            $cv-\u003erecv;\n        }\n\n        {\n            $_-\u003esync_start() for (@shards);\n        }\n\n        {\n            my ($status, $reason) = $shards[0]-\u003esync_ro();\n            die $reason unless $status;\n            print (($shards[0]-\u003esync_admin_cmd(\"show info\"))[1]);\n        }\n\n        # Some test case here\n\n        $shards[1]-\u003epause();\n\n        # Some test case here\n\n        $shards[1]-\u003eresume();\n\n        {\n            my ($status, $reason) = $shards[0]-\u003esync_rw();\n            die $reason unless $status;\n            print (($shards[0]-\u003esync_admin_cmd(\"show info\"))[1]);\n        }\n\n        # stop tarantools and clear work directoies\n        @shards = ();\n\nSUBROUTINES/METHODS\n  new option =\u003e value,...\n    Create new Test::Tarantool16 instance. Every call of new method increase\n    counter, below called as *tarantool number* or *tn*.\n\n    root =\u003e $path\n        Tarantool 1.6 work directory. Default is\n        *./tnt_\u003c10_random_lowercase_letters\u003e*\n\n    arena =\u003e $size\n        The maximal size of tarantool arena in Gb. Default is *0.1*\n\n    cleanup =\u003e $bool\n        Remove tarantool work directory after garbage collection. Default is\n        *1*\n\n    initlua =\u003e $content\n        Content of init.lua file. Be default an empty file created.\n\n    host =\u003e $address\n        Address bind to. Default: *127.0.0.1*\n\n    port =\u003e $port\n        Primary port number. Default is *3301+\u003ctn\u003e*4*\n\n    admin_port =\u003e $admin_port\n        Admin port number. Default is \"$port * 10\"\n\n    title =\u003e $title\n        Part of process name (custom_proc_title) Default is *\"yat\u003ctn\u003c\"*\n\n    wal_mode =\u003e $mode\n        The WAL write mode. See the desctiption of wal_mode tarantool\n        variable. Default is *none*. Look more about wal_mode in tarantool\n        documentation.\n\n    log_level =\u003e $number\n        Tarantool log level. Default is *5*\n\n    snapshot =\u003e $path\n        Path to some snapshot. If given the symbolic link to it will been\n        created in tarantool work directory.\n\n    replication_source =\u003e $string\n        If given the server is considered to be a Tarantool replica.\n\n    logger =\u003e $sub\n        An subroutine called at every time, when tarantool write some thing\n        in a log. The writed text passed as the first argument. Default is\n        warn.\n\n    on_die =\u003e $sub\n        An subroutine called on a unexpected tarantool termination.\n\n    tarantool_cmd =\u003e $tarantool_cmd\n        Command that should start tarantool instance. Parameterized with\n        %{args}. All necessary arguments will be substitued into %{args}\n\n  start option =\u003e $value, $cb-\u003e($status, $reason)\n    Run tarantool instance.\n\n    timeout =\u003e $timeout\n        If not After $timeout seconds tarantool will been killed by the KILL\n        signal if not started.\n\n  stop option =\u003e $value, $cb-\u003e($status, $reason)\n    stop tarantool instance\n\n    timeout =\u003e $timeout\n        After $timeout seconds tarantool will been kelled by the KILL signal\n\n  pause\n    Send STOP signal to instance\n\n  resume\n    Send CONT signal to instance\n\n  admin_cmd $cmd, $cb-\u003e($status, $response_or_reason)\n    Exec a command via the admin port.\n\n  times\n    Return values of utime and stime from /proc/[pid]/stat, converted to\n    seconds\n\n  sync_start sync_stop sync_admin_cmd\n    Aliases for start, stop, admin_cmd respectively, arguments a similar,\n    but cb not passed.\n\nAUTHOR\n    Anton Reznikov, \"\u003canton.n.reznikov at gmail.com\u003e\" igorcoding,\n    \"\u003cigorcoding at gmail.com\u003e\"\n\nBUGS\n    Please report any bugs or feature requests in\n    \u003chttps://github.com/igorcoding/Test-Tarantool16/issues\u003e\n\nSUPPORT\n    You can find documentation for this module with the perldoc command.\n\n        perldoc Test::Tarantool16\n\nACKNOWLEDGEMENTS\n        Mons Anderson    - The original idea of the module.\n\nLICENSE AND COPYRIGHT\n    Copyright 2015 igorcoding.\n\n    This program is released under the following license: GPL\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorcoding%2Ftest-tarantool16","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Figorcoding%2Ftest-tarantool16","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Figorcoding%2Ftest-tarantool16/lists"}