Same hack as before, but using the same TransformingClassLoader every time. This preserves static fields between test runs, and thus the thread pool from one of the tests is reused... this avoids spamming our TC server with new threads until it decides to fail the run due to excessive resource allocation.
JUnit added a nice launcher API that we could use if we wanted all tests to run with a specific class loader, but unfortunately we also want some tests (the NoLoader) to run with the normal app class loader.
Trust me, it works!
Same hack as before, but using the same
TransformingClassLoader
every time. This preserves static fields between test runs, and thus the thread pool from one of the tests is reused... this avoids spamming our TC server with new threads until it decides to fail the run due to excessive resource allocation.JUnit added a nice launcher API that we could use if we wanted all tests to run with a specific class loader, but unfortunately we also want some tests (the NoLoader) to run with the normal app class loader.