View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017121 | mantisbt | api soap | public | 2014-03-24 09:29 | 2023-10-31 16:32 |
Reporter | dregad | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Target Version | 2.26.0 | Fixed in Version | 2.26.0 | ||
Summary | 0017121: phpunit FilterTest fail if there are more than 50 issues in the tracker | ||||
Description | I was running the phpunit tests against an existing local DB containing other projects, and got the following:
After research, the failure is caused by limiting the number of issues returned to 50. I guess that one way to fix this could be to set ISSUES_TO_RETRIEVE = -1 (FilterTest.php line 33) but that may cause problems due to memory usage if there are many records; another would be to retrieve the last page and compute the difference based on that, however this is not easily done as it is currently not possible to get the page count (see 0008656). | ||||
Steps To Reproduce | Run phpunit tests in a system having more than 50 bugs in it. $ phpunit --bootstrap tests/bootstrap.php tests/soap/FilterTest.php | ||||
Additional Information | We never encountered this in TravisCI, because we always start from a fresh database. | ||||
Tags | TravisCI | ||||
related to | 0008656 | confirmed | please provide function that return issue count of current filter |
MantisBT: master 8129cd02 2023-02-17 19:05 Details Diff |
Skip FilterTests if there are too many issues Some tests can't be completed if there are more Issues in the database than the maximum number to retrieve (defined in ISSUES_TO_RETRIEVE constant), because they compare the number of Issues before/after executing the test, and both lists contain ISSUES_TO_RETRIEVE Issues. Mark the test case as skipped if getAllProjectsIssues() or getAllProjectsIssueHeaders() return ISSUES_TO_RETRIEVE or more Issues. Fixes 0017121 |
Affected Issues 0017121 |
|
mod - tests/soap/FilterTest.php | Diff File | ||
MantisBT: master 49d6e7d2 2023-02-17 19:29 Details Diff |
New bootstrap variable MANTIS_TESTSUITE_MAX_ISSUES This replaces the FilterTest::ISSUES_TO_RETRIEVE constant, allowing a developer to adjust the number of issues to retrieve when executing FilterTest cases. This avoids skipped tests when using a local database with more Issues than the default of 50 (which works fine for TravisCI tests, that start with an empty DB). This is a follow-up fix for Issue 0017121. |
Affected Issues 0017121 |
|
mod - tests/bootstrap.php.sample | Diff File | ||
mod - tests/soap/FilterTest.php | Diff File | ||
mod - tests/soap/SoapBase.php | Diff File |