Skip to content

Commit

Permalink
removes queue-wrapping from acp (#3498)
Browse files Browse the repository at this point in the history
Signed-off-by: OlegDokuka <odokuka@vmware.com>
  • Loading branch information
OlegDokuka committed Jun 13, 2023
1 parent 81c9852 commit f6e7748
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -285,6 +287,7 @@ void prefetchingShouldMaintainThreadLocals() {
}

@Test
@Disabled("queue wrapping is removed starting from 3.5.7")
void queueWrapperWorksWithQueues() {
Hooks.enableAutomaticContextPropagation();
Queue<Object> queue = Queues.small()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -285,6 +287,7 @@ void prefetchingShouldMaintainThreadLocals() {
}

@Test
@Disabled("queue wrapping is removed starting from 3.5.7")
void queueWrapperWorksWithQueues() {
Hooks.enableAutomaticContextPropagation();
Queue<Object> queue = Queues.small()
Expand Down

0 comments on commit f6e7748

Please sign in to comment.