[reflect] Fix flaky tests that depend on Reflection.clearCaches()
* Use ReflectionFactoryImpl as single point of synchronization * Synchronize all cache-sensitive tests on it in order to be robust in parallel test runners * Remove redundant cache clear after each test Merge-request: KT-MR-6842 Merged-by: Vsevolod Tolstopyatov <qwwdfsad@gmail.com>
This commit is contained in:
committed by
Space
parent
94abeb64c5
commit
e32e5c26a4
-4
@@ -21,7 +21,6 @@ import java.io.File;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.List;
|
||||
|
||||
import static org.jetbrains.kotlin.codegen.TestUtilsKt.clearReflectionCache;
|
||||
import static org.jetbrains.kotlin.test.KotlinTestUtils.assertEqualsToFile;
|
||||
import static org.jetbrains.kotlin.test.clientserver.TestProcessServerKt.getBoxMethodOrNull;
|
||||
import static org.jetbrains.kotlin.test.clientserver.TestProcessServerKt.getGeneratedClass;
|
||||
@@ -100,9 +99,6 @@ public abstract class AbstractBlackBoxCodegenTest extends CodegenTestCase {
|
||||
}
|
||||
throw ExceptionUtilsKt.rethrow(e);
|
||||
}
|
||||
finally {
|
||||
clearReflectionCache(generatedClassLoader);
|
||||
}
|
||||
}
|
||||
fail("Can't find box method!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user