The test infrastructure of Drupal.org is quite impressive. Every patch you add is automatically picked up and tested. You get (relatively) fast feedback on your patch, test results, coding standard conflicts, etc. Relatively fast means that you obviously have to wait a while for your results. In the case of a patch against Drupal Core this means that approximately 26,500(!) tests will be run. If the test is blunt, it clocks to one hour before all tests. A patch against a contrib module is obviously a lot faster because fewer tests need to be run. But the amount and lead time depends entirely on the tests for that module.
It is important to keep in mind when writing tests that you are not writing tests that succeed, but are just looking for things that can fail. For example, when writing tests you may encounter certain inconsistencies. Or you may even go a step further and write a test that fails because another known bug has yet to be fixed. As long as that test fails, you know that the other bug is still there. Here is an example. Wim Leers (Drupal Core Comitter) confirms that a test has failed due to a bug from another ticket. And this is deliberately left in. As soon as the test succeeds, we know that the other issue is fixed.