File tree Expand file tree Collapse file tree
context/src/test/java/io/opentelemetry/context Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88import static org .assertj .core .api .Assertions .assertThat ;
99import static org .awaitility .Awaitility .await ;
10+ import static org .junit .jupiter .api .Assertions .assertNull ;
1011import static org .mockito .ArgumentMatchers .any ;
1112import static org .mockito .ArgumentMatchers .anyLong ;
1213import static org .mockito .Mockito .doNothing ;
@@ -108,6 +109,12 @@ void attachSameTwice() {
108109 assertThat (Context .current ().get (ANIMAL )).isNull ();
109110 }
110111
112+ @ Test
113+ void keyEqualityIsInstanceCheck () {
114+ Context context = Context .current ().with (ContextKey .named ("animal" ), "cat" );
115+ assertNull (context .get (ContextKey .named ("animal" ))); // yup
116+ }
117+
111118 @ Test
112119 void newThreadStartsWithRoot () throws Exception {
113120 Context context = Context .current ().with (ANIMAL , "cat" );
You can’t perform that action at this time.
0 commit comments