From 0157aa00017a048b07673e14f5ea96f85b7ab1ff Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Fri, 23 Jun 2023 01:21:06 +0530 Subject: [PATCH 1/8] Allowing Blocking call for handlePossibleCancellationInterrupt --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 93540d4236..3ca9221527 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -36,6 +36,8 @@ public class ReactorBlockHoundIntegrationTest { // Use the builder to load only our integration to avoid false positives BlockHound.builder() .with(new ReactorBlockHoundIntegration()) + .allowBlockingCallsInside("java.util.concurrent.FutureTask", + "handlePossibleCancellationInterrupt") .install(); } From c7cdc0a08aa25aa73551769b575ad55aea3984ef Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Fri, 23 Jun 2023 01:39:04 +0530 Subject: [PATCH 2/8] updating licence --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 3ca9221527..80237a706e 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022 VMware Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2019-2023 VMware Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From 1f39369afa612b502d89816d3eddbbbbb7edb3ff Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Fri, 23 Jun 2023 22:36:48 +0530 Subject: [PATCH 3/8] updating timeout to 10 sec --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 80237a706e..64ee6100d1 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -29,7 +29,7 @@ import reactor.core.publisher.Mono; import reactor.test.util.RaceTestUtils; -@Timeout(5) +@Timeout(10) public class ReactorBlockHoundIntegrationTest { static { From 729b6d71a251525fc193e59a69ca186471c72fe5 Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Tue, 27 Jun 2023 23:53:14 +0530 Subject: [PATCH 4/8] Revert "updating timeout to 10 sec" This reverts commit 1f39369afa612b502d89816d3eddbbbbb7edb3ff. --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 64ee6100d1..80237a706e 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -29,7 +29,7 @@ import reactor.core.publisher.Mono; import reactor.test.util.RaceTestUtils; -@Timeout(10) +@Timeout(5) public class ReactorBlockHoundIntegrationTest { static { From 8ddb8ee92a1f917bcead49dbd86601a803b97041 Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Tue, 27 Jun 2023 23:53:49 +0530 Subject: [PATCH 5/8] Revert "Allowing Blocking call for handlePossibleCancellationInterrupt" This reverts commit 0157aa00017a048b07673e14f5ea96f85b7ab1ff. --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 80237a706e..1abb729c04 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -36,8 +36,6 @@ public class ReactorBlockHoundIntegrationTest { // Use the builder to load only our integration to avoid false positives BlockHound.builder() .with(new ReactorBlockHoundIntegration()) - .allowBlockingCallsInside("java.util.concurrent.FutureTask", - "handlePossibleCancellationInterrupt") .install(); } From d98256b08089de1c43741017cb88ebde8dacbbb4 Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Wed, 28 Jun 2023 00:09:01 +0530 Subject: [PATCH 6/8] Allowing Blocking call for handlePossibleCancellationInterrupt --- .../reactor/core/scheduler/ReactorBlockHoundIntegration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java b/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java index 8d2987cb86..e697510280 100644 --- a/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java +++ b/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2022 VMware Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2019-2023 VMware Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,5 +50,7 @@ public void applyTo(BlockHound.Builder builder) { // For now, let's not add a separate integration, but rather let's define the class name manually // ContextRegistry reads files as part of the Service Loader aspect. If class is initialized in a non-blocking thread, BlockHound would complain builder.allowBlockingCallsInside("reactor.core.publisher.ContextPropagation", ""); + builder.allowBlockingCallsInside("java.util.concurrent.FutureTask", + "handlePossibleCancellationInterrupt"); } } From 6034d88d7a00275a4e83acf5e9a5e0dd282fca9e Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Fri, 30 Jun 2023 23:28:39 +0530 Subject: [PATCH 7/8] Revert "updating licence" This reverts commit c7cdc0a08aa25aa73551769b575ad55aea3984ef. --- .../core/scheduler/ReactorBlockHoundIntegrationTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java index 1abb729c04..93540d4236 100644 --- a/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java +++ b/reactor-core/src/blockHoundTest/java/reactor/core/scheduler/ReactorBlockHoundIntegrationTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019-2023 VMware Inc. or its affiliates, All Rights Reserved. + * Copyright (c) 2019-2022 VMware Inc. or its affiliates, All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. From be375655a4fbba616c27e5d6ef4f135e73e9693a Mon Sep 17 00:00:00 2001 From: tejavenkatlanka Date: Fri, 30 Jun 2023 23:33:13 +0530 Subject: [PATCH 8/8] using class object reference --- .../reactor/core/scheduler/ReactorBlockHoundIntegration.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java b/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java index e697510280..ba6b769fba 100644 --- a/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java +++ b/reactor-core/src/main/java/reactor/core/scheduler/ReactorBlockHoundIntegration.java @@ -19,6 +19,7 @@ import reactor.blockhound.BlockHound; import reactor.blockhound.integration.BlockHoundIntegration; +import java.util.concurrent.FutureTask; import java.util.concurrent.ScheduledThreadPoolExecutor; import java.util.concurrent.ThreadPoolExecutor; @@ -50,7 +51,6 @@ public void applyTo(BlockHound.Builder builder) { // For now, let's not add a separate integration, but rather let's define the class name manually // ContextRegistry reads files as part of the Service Loader aspect. If class is initialized in a non-blocking thread, BlockHound would complain builder.allowBlockingCallsInside("reactor.core.publisher.ContextPropagation", ""); - builder.allowBlockingCallsInside("java.util.concurrent.FutureTask", - "handlePossibleCancellationInterrupt"); + builder.allowBlockingCallsInside(FutureTask.class.getName(),"handlePossibleCancellationInterrupt"); } }