Posted by sun on
- Maintainers and developers are confused about varying positive test assertion counts for patches passing tests.
- Ensure that assertion counts can be trusted.
- Running the same test suite on the same machine can yield a difference of hundreds assertions.
- The difference is caused by various tests that use
rand(1, 10)for their initial setup (which means that test assertions are exponentially increasing for each additional item).
- Remove all calls to
rand()from all tests.
|PASSED: [[SimpleTest]]: [MySQL] 39,240 pass(es).|
|PASSED: [[SimpleTest]]: [MySQL] 37,043 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1560028_0.patch. Unable to apply patch. See the log in the details link for more information.|
|FAILED: [[SimpleTest]]: [MySQL] 36,670 pass(es), 9 fail(s), and 9 exception(s).|