Fix tests for lib

Description

How to Repeat

Results are for PS 5.7.40.

$ prove -vw --trap --timer t/lib ... [20:07:07] t/lib/IndexUsage.t ............ 1..7 ok 1 - Got unused indexes for sakila.actor and film_actor ok 2 - Saves index data ok 3 - Saves table data ok 4 - Saves index usage data ok 5 - Save alt index data ok 6 - Unused indexes for sakila.actor and film_actor ok 7 - Sandbox servers ok 1397 ms ( 0.00 usr 0.00 sys + 0.36 cusr 0.12 csys = 0.48 CPU) [20:07:08] t/lib/JSONReportFormatter.t ... Can't locate File/Slurp.pm in @INC (you may need to install the File::Slurp module) (@INC contains: /home/sveta/src/percona-toolkit/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.34.0 /usr/local/share/perl/5.34.0 /usr/lib/x86_64-linux-gnu/perl5/5.34 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.34 /usr/share/perl/5.34 /usr/local/lib/site_perl) at t/lib/JSONReportFormatter.t line 16. BEGIN failed--compilation aborted at t/lib/JSONReportFormatter.t line 16. Dubious, test returned 2 (wstat 512, 0x200) No subtests run ... [20:07:11] t/lib/MasterSlave.t ........... ok 1 - get_slaves() from recurse_to_slaves() with a default --recursion-method ... ok 59 - Wait for master returned error DBD::mysql::db do failed: Slave channel 'masterchan2' does not exist. [for Statement "STOP SLAVE for channel 'masterchan2'"] at t/lib/MasterSlave.t line 835. # Tests were run but no plan was declared and done_testing() was not seen. # Looks like your test exited with 95 just after 59. Dubious, test returned 95 (wstat 24320, 0x5f00) All 59 subtests passed ... [20:08:43] t/lib/MockSyncStream.t ........ 1..6 ok 1 - get_sql() ok 2 - Not done yet ok 3 - rows from handler ok 4 - Gets result set struct from sth attribs ok 5 - as_arrayref() ERROR: Sandbox master3 2900 was left up. not ok 6 - Sandbox servers # Failed test 'Sandbox servers' # at t/lib/MockSyncStream.t line 202. Bailout called. Further testing stopped: t/lib/MockSyncStream.t broke the sandbox

Suggested Fix

Identify which tests fail, because badly written and which show real issues with code, fix either tests or code.

Environment

None

Activity

Show:

Sveta Smirnova June 19, 2023 at 2:25 PM

Current state for 8.0 tests:

Test Summary Report ------------------- t/lib/CompareQueryTimes.t (Wstat: 512 Tests: 25 Failed: 2) Failed tests: 22-23 Non-zero exit status: 2 t/lib/CompareResults.t (Wstat: 1024 Tests: 57 Failed: 4) Failed tests: 20, 40, 44, 51 Non-zero exit status: 4 t/lib/IndexUsage.t (Wstat: 256 Tests: 7 Failed: 1) Failed test: 5 Non-zero exit status: 1 t/lib/JSONReportFormatter.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output t/lib/Processlist.t (Wstat: 1024 Tests: 43 Failed: 4) Failed tests: 16, 26, 29-30 Non-zero exit status: 4 t/lib/QueryHistory.t (Wstat: 512 Tests: 6 Failed: 2) Failed tests: 2, 4 Non-zero exit status: 2 t/lib/QueryReportFormatter.t (Wstat: 4608 Tests: 40 Failed: 18) Failed tests: 4, 9, 13, 18-20, 22-31, 37-38 Non-zero exit status: 18 t/lib/QueryReview.t (Wstat: 6400 Tests: 1 Failed: 0) Non-zero exit status: 25 Parse errors: No plan found in TAP output t/lib/RowDiff.t (Wstat: 512 Tests: 18 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 27 tests but ran 18. t/lib/SchemaIterator.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 42 tests but ran 0. t/lib/TableChunker.t (Wstat: 512 Tests: 39 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output t/lib/TableParser.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output t/lib/Transformers.t (Wstat: 256 Tests: 74 Failed: 1) Failed test: 37 Non-zero exit status: 1
Done

Details

Assignee

Reporter

Priority

Affects versions

Fix versions

Needs QA

Yes

Story Points

Smart Checklist

Created December 29, 2022 at 5:07 PM
Updated February 29, 2024 at 8:42 PM
Resolved August 2, 2023 at 11:50 AM

Flag notifications