My situation is this: two test cases, say TestA and TestB should run in different env. However, TestA comes first, it will dynamically compile some generated codes, add them to the class path and then load them. In contrast, TestB needs a pure env that does not include previously loaded classes. Is there any way to do this? Clear class loader, delete specific loaded class?
source
share