mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-09-03 04:26:12 +08:00
Fix ordering related issue in ReactorAutoConfigurationTests
See gh-34201
This commit is contained in:
parent
ec3c6ae382
commit
fc9c1c0964
@ -20,8 +20,11 @@ import java.util.concurrent.atomic.AtomicReference;
|
||||
|
||||
import io.micrometer.context.ContextRegistry;
|
||||
import org.junit.jupiter.api.AfterAll;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import reactor.core.publisher.Hooks;
|
||||
import reactor.core.publisher.Mono;
|
||||
import reactor.util.context.Context;
|
||||
|
||||
@ -45,6 +48,12 @@ class ReactorAutoConfigurationTests {
|
||||
|
||||
private static final ThreadLocal<String> THREADLOCAL_VALUE = ThreadLocal.withInitial(() -> "initial");
|
||||
|
||||
@BeforeEach
|
||||
@AfterEach
|
||||
void resetStaticState() {
|
||||
Hooks.disableAutomaticContextPropagation();
|
||||
}
|
||||
|
||||
@BeforeAll
|
||||
static void initializeThreadLocalAccessors() {
|
||||
ContextRegistry globalRegistry = ContextRegistry.getInstance();
|
||||
|
Loading…
Reference in New Issue
Block a user