t/AuthoritiesMarc_MARC21.t is failing on 22.05.07 Please see the output below: kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ prove t/AuthoritiesMarc_MARC21.t t/AuthoritiesMarc_MARC21.t .. 1/5 # No tests run! t/AuthoritiesMarc_MARC21.t .. 5/5 # Failed test 'No tests run for subtest "FindDuplicateAuthority tests"' # at t/AuthoritiesMarc_MARC21.t line 62. DBIx::Class::Storage::DBI::catch {...} (): DBI Connection failed: DBI connect('database=koha_kohadev;host=localhost;port=3306','koha_kohadev',...) failed: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) at /home/vagrant/kohaclone/Koha/Database.pm line 91. at /home/vagrant/kohaclone/Koha/Database.pm line 139 # Looks like your test exited with 255 just after 5. t/AuthoritiesMarc_MARC21.t .. Dubious, test returned 255 (wstat 65280, 0xff00) Failed 1/5 subtests Test Summary Report ------------------- t/AuthoritiesMarc_MARC21.t (Wstat: 65280 Tests: 5 Failed: 1) Failed test: 5 Non-zero exit status: 255 Files=1, Tests=5, 2 wallclock secs ( 0.02 usr 0.01 sys + 1.57 cusr 0.17 csys = 1.77 CPU) Result: FAIL
It appears the tests added in bug 31023 have made this test db dependent now so it looks like it needs to be moved to t/db_dependent
I dont think the tests can be written to work without a db, (and still test something) so shifting this file to t/db_dependent seems the only way forward. We will send a patch
Created attachment 144370 [details] [review] bug 32375: moving t/AuthoritiesMarc_MARC21.t to t/db_dependent t/AuthoritiesMarc_MARC21.t is now db dependent so it needs to be in t/db_dependent to pass the tests Sponsored-by: Catalyst IT
Hey all, I am having trouble making t/AuthoritiesMarc_MARC21.t fail on my 22.05.x branch. Maybe I missing a specific configuration that will make this fail?
(In reply to Lucas Gass from comment #4) > Hey all, > > I am having trouble making t/AuthoritiesMarc_MARC21.t fail on my 22.05.x > branch. > > Maybe I missing a specific configuration that will make this fail? Hi Lucas, Can you start mysql and see if it fails then? Thanks
Thats right you have to have no db, so if you stop mariadb, or mysqlserver and run it will fail.
Created attachment 145780 [details] [review] Bug 32375: Move t/AuthoritiesMarc_MARC21.t to t/db_dependent t/AuthoritiesMarc_MARC21.t is now database dependent so it needs to be in t/db_dependent to pass the tests. Test plan (using koha-testing-docker): 1. If you run prove t/AuthoritiesMarc_MARC21.t without stopping the database, the tests will pass. To get the tests to fail: 1.1 Stop the database - from a new terminal window run: docker stop koha-db-1 1.2 In your Koha container run: prove t/AuthoritiesMarc_MARC21.t ==> The tests fail 8-( 2. Restart the database container from the terminal window you stopped it in: docker start koha-db-1 3. Apply the patch in the Koha container as normal. 4. Run: prove t/db_dependent/AuthoritiesMarc_MARC21.t ==> The test pass! 5. Sign off D: Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com>
I tested with koha-testing-docker (KTD) and updated the commit message to format the bug title as expected by the QA Team and added the test plan I used. I hope what I've done is sufficient/correct!
Created attachment 147811 [details] [review] Bug 32375: Move t/AuthoritiesMarc_MARC21.t to t/db_dependent t/AuthoritiesMarc_MARC21.t is now database dependent so it needs to be in t/db_dependent to pass the tests. Test plan (using koha-testing-docker): 1. If you run prove t/AuthoritiesMarc_MARC21.t without stopping the database, the tests will pass. To get the tests to fail: 1.1 Stop the database - from a new terminal window run: docker stop koha-db-1 1.2 In your Koha container run: prove t/AuthoritiesMarc_MARC21.t ==> The tests fail 8-( 2. Restart the database container from the terminal window you stopped it in: docker start koha-db-1 3. Apply the patch in the Koha container as normal. 4. Run: prove t/db_dependent/AuthoritiesMarc_MARC21.t ==> The test pass! 5. Sign off D: Sponsored-by: Catalyst IT Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Works, QA script happy, change looks good, passing QA :)
Backported to 22.05.x for upcoming 22.05.11
applied to 21.11 for 21.11.19
Not backported to 21.05.x