GH-9260: Fix IntegrationManagementConfiguration.obtainObservationPatterns() logic
Fixes: #9260
The current `IntegrationManagementConfiguration.obtainObservationPatterns()` is to always have an `*` as a first
pattern in the final result.
Because of `HashSet` natural order.
This would lead to ignore all the patterns, especially those with negation
* Fix `IntegrationManagementConfiguration.obtainObservationPatterns()` logic to ignore regular
patterns if `*` is present.
Optimization wise.
* Always put `*` into the end of final array let negative patterns to do their job
* Modify `IntegrationGraphServerTests` & `WebFluxObservationPropagationTests`
test configurations to ensure that `*` pattern does not have a precedence over negative patterns.
(cherry picked from commit 4108ea520e)
This commit is contained in:
committed by
Spring Builds
parent
f997de4855
commit
e99acd85cb
@@ -125,7 +125,7 @@ public class WebFluxObservationPropagationTests {
|
||||
@Configuration
|
||||
@EnableWebFlux
|
||||
@EnableIntegration
|
||||
@EnableIntegrationManagement(observationPatterns = "*")
|
||||
@EnableIntegrationManagement(observationPatterns = "*,!notObserved*")
|
||||
public static class ContextConfiguration {
|
||||
|
||||
@Bean
|
||||
@@ -201,6 +201,8 @@ public class WebFluxObservationPropagationTests {
|
||||
.transformWith(t -> t
|
||||
.<String, String>transformer(String::toLowerCase)
|
||||
.id("testTransformer"))
|
||||
.channel("notObservedChannel")
|
||||
.bridge(e -> e.id("notObservedEndpoint"))
|
||||
.get();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user