@@ -77,7 +77,7 @@ public void getCurrentSpan() {
7777 Context origContext = ContextUtils .withValue (Context .current (), span ).attach ();
7878 // Make sure context is detached even if test fails.
7979 try {
80- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
80+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
8181 } finally {
8282 Context .current ().detach (origContext );
8383 }
@@ -89,7 +89,7 @@ public void withSpan_CloseDetaches() {
8989 assertThat (CurrentSpanUtils .getCurrentSpan ()).isEqualTo (BlankSpan .INSTANCE );
9090 Scope ws = CurrentSpanUtils .withSpan (span , false );
9191 try {
92- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
92+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
9393 } finally {
9494 ws .close ();
9595 }
@@ -102,7 +102,7 @@ public void withSpan_CloseDetachesAndEndsSpan() {
102102 assertThat (CurrentSpanUtils .getCurrentSpan ()).isEqualTo (BlankSpan .INSTANCE );
103103 Scope ss = CurrentSpanUtils .withSpan (span , true );
104104 try {
105- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
105+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
106106 } finally {
107107 ss .close ();
108108 }
@@ -118,7 +118,7 @@ public void withSpanRunnable() {
118118 @ Override
119119 public void run () {
120120 // When we run the runnable we will have the span in the current Context.
121- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
121+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
122122 }
123123 };
124124 CurrentSpanUtils .withSpan (span , false , runnable ).run ();
@@ -134,7 +134,7 @@ public void withSpanRunnable_EndSpan() {
134134 @ Override
135135 public void run () {
136136 // When we run the runnable we will have the span in the current Context.
137- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
137+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
138138 }
139139 };
140140 CurrentSpanUtils .withSpan (span , true , runnable ).run ();
@@ -151,7 +151,7 @@ public void withSpanRunnable_WithError() {
151151 @ Override
152152 public void run () {
153153 // When we run the runnable we will have the span in the current Context.
154- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
154+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
155155 throw error ;
156156 }
157157 };
@@ -170,7 +170,7 @@ public void withSpanRunnable_WithErrorNoMessage() {
170170 @ Override
171171 public void run () {
172172 // When we run the runnable we will have the span in the current Context.
173- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
173+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
174174 throw error ;
175175 }
176176 };
@@ -189,7 +189,7 @@ public void withSpanCallable() throws Exception {
189189 @ Override
190190 public Object call () throws Exception {
191191 // When we run the runnable we will have the span in the current Context.
192- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
192+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
193193 return ret ;
194194 }
195195 };
@@ -207,7 +207,7 @@ public void withSpanCallable_EndSpan() throws Exception {
207207 @ Override
208208 public Object call () throws Exception {
209209 // When we run the runnable we will have the span in the current Context.
210- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
210+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
211211 return ret ;
212212 }
213213 };
@@ -225,7 +225,7 @@ public void withSpanCallable_WithException() {
225225 @ Override
226226 public Object call () throws Exception {
227227 // When we run the runnable we will have the span in the current Context.
228- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
228+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
229229 throw exception ;
230230 }
231231 };
@@ -244,7 +244,7 @@ public void withSpanCallable_WithExceptionNoMessage() {
244244 @ Override
245245 public Object call () throws Exception {
246246 // When we run the runnable we will have the span in the current Context.
247- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
247+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
248248 throw exception ;
249249 }
250250 };
@@ -263,7 +263,7 @@ public void withSpanCallable_WithError() {
263263 @ Override
264264 public Object call () throws Exception {
265265 // When we run the runnable we will have the span in the current Context.
266- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
266+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
267267 throw error ;
268268 }
269269 };
@@ -282,7 +282,7 @@ public void withSpanCallable_WithErrorNoMessage() {
282282 @ Override
283283 public Object call () throws Exception {
284284 // When we run the runnable we will have the span in the current Context.
285- assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameAs (span );
285+ assertThat (CurrentSpanUtils .getCurrentSpan ()).isSameInstanceAs (span );
286286 throw error ;
287287 }
288288 };
0 commit comments