From f6e77482a1c3449ba8212db117f45925108fa146 Mon Sep 17 00:00:00 2001 From: Oleh Dokuka <5380167+OlegDokuka@users.noreply.github.com> Date: Tue, 13 Jun 2023 19:06:36 +0300 Subject: [PATCH] removes queue-wrapping from acp (#3498) Signed-off-by: OlegDokuka --- reactor-core/src/main/java/reactor/core/publisher/Hooks.java | 1 - .../java/reactor/core/publisher/ContextPropagationTest.java | 3 +++ .../java/reactor/core/publisher/ContextPropagationTest.java | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/reactor-core/src/main/java/reactor/core/publisher/Hooks.java b/reactor-core/src/main/java/reactor/core/publisher/Hooks.java index 1b73aa56bd..fd909c5c0d 100644 --- a/reactor-core/src/main/java/reactor/core/publisher/Hooks.java +++ b/reactor-core/src/main/java/reactor/core/publisher/Hooks.java @@ -542,7 +542,6 @@ public static void disableContextLossTracking() { */ public static void enableAutomaticContextPropagation() { if (ContextPropagationSupport.isContextPropagationOnClasspath) { - Hooks.addQueueWrapper(CONTEXT_IN_THREAD_LOCALS_KEY, ContextPropagation.ContextQueue::new); Schedulers.onScheduleHook(CONTEXT_IN_THREAD_LOCALS_KEY, ContextPropagation.scopePassingOnScheduleHook()); ContextPropagationSupport.propagateContextToThreadLocals = true; diff --git a/reactor-core/src/withContextPropagation102Test/java/reactor/core/publisher/ContextPropagationTest.java b/reactor-core/src/withContextPropagation102Test/java/reactor/core/publisher/ContextPropagationTest.java index daaeab6a2d..069ec409bb 100644 --- a/reactor-core/src/withContextPropagation102Test/java/reactor/core/publisher/ContextPropagationTest.java +++ b/reactor-core/src/withContextPropagation102Test/java/reactor/core/publisher/ContextPropagationTest.java @@ -40,6 +40,7 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.provider.EnumSource; @@ -164,6 +165,7 @@ void threadLocalsPresentAfterDelay() { } @Test + @Disabled("queue wrapping is removed starting from 3.5.7") void threadLocalsRestoredAfterPollution() { // this test validates Queue wrapping takes place Hooks.enableAutomaticContextPropagation(); @@ -285,6 +287,7 @@ void prefetchingShouldMaintainThreadLocals() { } @Test + @Disabled("queue wrapping is removed starting from 3.5.7") void queueWrapperWorksWithQueues() { Hooks.enableAutomaticContextPropagation(); Queue queue = Queues.small() diff --git a/reactor-core/src/withMicrometerTest/java/reactor/core/publisher/ContextPropagationTest.java b/reactor-core/src/withMicrometerTest/java/reactor/core/publisher/ContextPropagationTest.java index ba33fe88ea..5c5a594462 100644 --- a/reactor-core/src/withMicrometerTest/java/reactor/core/publisher/ContextPropagationTest.java +++ b/reactor-core/src/withMicrometerTest/java/reactor/core/publisher/ContextPropagationTest.java @@ -41,6 +41,7 @@ import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.params.provider.EnumSource; @@ -165,6 +166,7 @@ void threadLocalsPresentAfterDelay() { } @Test + @Disabled("queue wrapping is removed starting from 3.5.7") void threadLocalsRestoredAfterPollution() { // this test validates Queue wrapping takes place Hooks.enableAutomaticContextPropagation(); @@ -285,6 +287,7 @@ void prefetchingShouldMaintainThreadLocals() { } @Test + @Disabled("queue wrapping is removed starting from 3.5.7") void queueWrapperWorksWithQueues() { Hooks.enableAutomaticContextPropagation(); Queue queue = Queues.small()