File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/main/java/com/nordstrom/automation/junit Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -55,10 +55,15 @@ public String val() {
5555 private static final ThreadLocal <JUnitConfig > junitConfig = new InheritableThreadLocal <JUnitConfig >() {
5656 @ Override
5757 protected JUnitConfig initialValue () {
58+ final ClassLoader original = Thread .currentThread ().getContextClassLoader ();
5859 try {
60+ final ClassLoader specific = LifecycleHooks .class .getClassLoader ();
61+ Thread .currentThread ().setContextClassLoader (specific );
5962 return new JUnitConfig ();
6063 } catch (ConfigurationException | IOException e ) {
6164 throw UncheckedThrow .throwUnchecked (e );
65+ } finally {
66+ Thread .currentThread ().setContextClassLoader (original );
6267 }
6368 }
6469 };
Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ protected Deque<Object> initialValue() {
4848 public static void intercept (@ This final Object runner , @ SuperCall final Callable <?> proxy ,
4949 @ Argument (0 ) final RunNotifier notifier ) throws Exception {
5050
51- JUnitConfig .getConfig ();
5251 RUNNER_TO_NOTIFIER .put (runner , notifier );
5352
5453 attachRunListeners (runner , notifier );
You can’t perform that action at this time.
0 commit comments