{"id":17882202,"url":"https://github.com/mackee/app-prove-plugin-mysqlpool","last_synced_at":"2025-03-22T12:31:36.738Z","repository":{"id":7421845,"uuid":"8756693","full_name":"mackee/App-Prove-Plugin-MySQLPool","owner":"mackee","description":"pool of Test::mysqld-s reused while testing","archived":false,"fork":false,"pushed_at":"2023-09-17T02:53:02.000Z","size":56,"stargazers_count":4,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-18T11:05:27.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mackee.png","metadata":{"files":{"readme":"README.md","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-13T16:37:26.000Z","updated_at":"2023-09-17T02:53:02.000Z","dependencies_parsed_at":"2024-10-28T13:18:30.578Z","dependency_job_id":"f54f3e02-8512-4903-acef-ca2c73af6c27","html_url":"https://github.com/mackee/App-Prove-Plugin-MySQLPool","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2FApp-Prove-Plugin-MySQLPool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2FApp-Prove-Plugin-MySQLPool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2FApp-Prove-Plugin-MySQLPool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mackee%2FApp-Prove-Plugin-MySQLPool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mackee","download_url":"https://codeload.github.com/mackee/App-Prove-Plugin-MySQLPool/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244959443,"owners_count":20538625,"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":"2024-10-28T12:48:43.422Z","updated_at":"2025-03-22T12:31:36.160Z","avatar_url":"https://github.com/mackee.png","language":"Perl","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NAME\n\nApp::Prove::Plugin::MySQLPool - pool of Test::mysqld-s reused while testing\n\n# SYNOPSIS\n\n    prove -j4 -PMySQLPool t\n      or\n    prove -j4 -PMySQLPool=MyApp::Test::DB t\n\n# DESCRIPTION\n\nApp::Prove::Plugin::MySQLPool is a [prove](https://metacpan.org/pod/prove) plugin to speedup your tests using a pool of [Test::mysqld](https://metacpan.org/pod/Test%3A%3Amysqld)s.\n\nIf you're using Test::mysqld, and have a lot of tests using it, annoyed by the mysql startup time slowing your tests, this module is for you.\n\nThis module launches -j number of Test::mysqld instances first.\n\nNext, each mysqld instance optionally calls\n\n    MyApp::Test::DB-\u003eprepare( $mysqld );\n\nYou can CREATE TABLEs using [GitDDL](https://metacpan.org/pod/GitDDL) or [DBIx::Class::Schema::Loader](https://metacpan.org/pod/DBIx%3A%3AClass%3A%3ASchema%3A%3ALoader) or others,\nor bulk insert master data before start testing.\n\nMyApp::Test::DB only needs to implement a `prepare` sub.\n`prepare` is called only once per -j number of mysqld instances,\nand is called before your first .t file get tested.\n\n    # MyApp::Test::DB\n    sub prepare {\n        my ($package, $mysqld) = @_;\n        my $gd = GitDDL-\u003enew( dsn =\u003e $mysqld-\u003edsn, ... );\n        $gd-\u003edeploy;\n    }\n\nUse $ENV{ PERL\\_TEST\\_MYSQLPOOL\\_DSN } like following in your test code.\n\n    my $dbh = DBI-\u003econnect( $ENV{ PERL_TEST_MYSQLPOOL_DSN } );\n\nSince this module reuses mysqlds,\nyou'd better erase all rows inserted at the top of your tests.\n\n    $dbh-\u003edo( \"TRUNCATE $_\" ) for @tables;\n\nIf you need customize my.cnf, you may want to implement `my_cnf` method in MyApp::Test::DB.\n\n    # MyApp::Test::DB\n    sub my_cnf {\n        +{\n            \"skip-networking\" =\u003e \"\",\n            \"character-set-server\" =\u003e \"utf8mb4\",\n        };\n    }\n\nThis config is used before launching Test::mysqld instances.\nSo you can set non-dynamic system variables.\n\n# AUTHOR\n\nMasakazu Ohtsuka \u003co.masakazu@gmail.com\u003e\n\n# SEE ALSO\n\n[prove](https://metacpan.org/pod/prove), [Test::mysqld](https://metacpan.org/pod/Test%3A%3Amysqld)\n\n# LICENSE\n\nThis library is free software; you can redistribute it and/or modify\nit under the same terms as Perl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fapp-prove-plugin-mysqlpool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmackee%2Fapp-prove-plugin-mysqlpool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmackee%2Fapp-prove-plugin-mysqlpool/lists"}