File tree Expand file tree Collapse file tree
sdk/common/src/test/java/io/opentelemetry/sdk/common/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,4 +162,19 @@ private static void shouldIncludeAll(
162162 .isEqualTo ("IncludeExcludePredicate{globMatchingEnabled=true}" );
163163 });
164164 }
165+
166+ @ Test
167+ void shouldExcludeWhenValueMatchesBothIncludeAndExclude () {
168+ String value = "a" ;
169+ Collection <String > exactMatchingArg = Collections .singletonList ("a" );
170+
171+ Predicate <String > exactMatching =
172+ IncludeExcludePredicate .createExactMatching (exactMatchingArg , exactMatchingArg );
173+ assertThat (exactMatching .test (value )).isFalse ();
174+
175+ Collection <String > patternMatchingArg = Collections .singletonList ("*" );
176+ Predicate <String > patternMatching =
177+ IncludeExcludePredicate .createPatternMatching (patternMatchingArg , patternMatchingArg );
178+ assertThat (patternMatching .test (value )).isFalse ();
179+ }
165180}
You can’t perform that action at this time.
0 commit comments