Skip to content

Commit 0485a6d

Browse files
Improve unit test determinism
… apparently the before/after was a race condition … adding @before seems to have made it better for me.
1 parent 3dac148 commit 0485a6d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

rxjava-core/src/main/java/rx/plugins/RxJavaPlugins.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import java.util.concurrent.atomic.AtomicReference;
2121

2222
import org.junit.After;
23+
import org.junit.Before;
2324
import org.junit.Test;
2425

2526
/**
@@ -153,6 +154,7 @@ private static Object getPluginImplementationViaProperty(Class<?> pluginClass) {
153154
public static class UnitTest {
154155

155156
@After
157+
@Before
156158
public void reset() {
157159
// use private access to reset so we can test different initializations via the public static flow
158160
RxJavaPlugins.getInstance().errorHandler.set(null);

0 commit comments

Comments
 (0)