As far as I know, if I have procedures test_a, test_b, test_c, they should execute in alphabetical order.
Since our upgrade from 9i to 10g, this is not happening anymore. It is happening in a non-alphanumeric order, so any dependencies between test-cases cause some test procedures to fail.
I think that ordering should be introduced in.
I have found the problem in ut_plsql.pkb. The SELECT statements inside of populate_test_array have a SELECT DISTINCT but do not include an ORDER BY. I think in previous versions of Oracle, SELECT DISTINCT always included an implied ORDER BY, but not in 10G. This should be a fairly simple update.
The standard in xUnit frameworks is for each test to be independent, and therefore SETUP and TEARDOWN should be called before and after each test ([bugs:#4] relates to this).
Having said that, I can see no reason for not performing them in order (it makes the report look tidier if nothing else), so I would support this request.
Related
Bugs Archive (Use GitHub now):
#4a sample patch
Thanks David, I'll try to review and test this shortly
I haven't gotten round to testing this yet, but I see the ordering is controlled by a parameter. I'm wondering if it needs to be? Is there any reason why anyone would set it to "No"?
yes i beleive so..
i had a reason.. but i think it should probably be controlled by a config option.
i saw the case where you wanted to run in a specific order but didnt/couldnt name your procedures correctly and so you rely on physical ordering.
i dont mind personally.. i prefer alphabetic.. but i dont mind if you want to just fix it as non changeable.
Last edit: David Pyke Le Brun 2014-03-02
Applied David's patch (above) to the branch in [r155]
Related
Commit: [r155]
Just a point to note that without an explicit
ORDER BY
(as was the case before this patch), no assumption can be made about the order the rows will be returned. Therefore there is no "default" order:I've removed the parameter to control this - as noted above, there is no guaranteed "default order" in Oracle anyway. Committed to the branch in [r156].
Edit: I accidentally left an extra bracket in [r156] - corrected in [r157]
Related
Commit: [r156]
Commit: [r157]
Last edit: Paul Walker 2014-04-21
[r158] tidies up a bit of spacing that got changed in [r155]
Related
Commit: [r155]
Commit: [r158]
I've tested this and it appears to work as expected. Merged into trunk, ready for release. [r159]
Related
Commit: [r159]