@@ -11,7 +11,7 @@ import org.apache.pekko.actor.ActorSystem
1111import org .apache .pekko .pattern .after
1212import org .assertj .core .api .Assertions .assertThat
1313import org .junit .jupiter .api .Test
14- import scala .concurrent .{ Await , Future }
14+ import scala .concurrent .{Await , Future }
1515import scala .concurrent .duration .DurationInt
1616
1717class PekkoSchedulerTest {
@@ -26,15 +26,21 @@ class PekkoSchedulerTest {
2626 val scope = initialSpan.makeCurrent()
2727 val futureResult = for {
2828 result1 <- Future {
29- assertThat(Span .current().getSpanContext().getTraceId()).isEqualTo(initialSpan.getSpanContext().getTraceId())
30- assertThat(Span .current().getSpanContext().getSpanId()).isEqualTo(initialSpan.getSpanContext().getSpanId())
29+ assertThat(Span .current().getSpanContext().getTraceId())
30+ .isEqualTo(initialSpan.getSpanContext().getTraceId())
31+ assertThat(Span .current().getSpanContext().getSpanId())
32+ .isEqualTo(initialSpan.getSpanContext().getSpanId())
3133 1
3234 }
33- _ = assertThat(Span .current().getSpanContext().getTraceId()).isEqualTo(initialSpan.getSpanContext().getTraceId())
34- _ = assertThat(Span .current().getSpanContext().getSpanId()).isEqualTo(initialSpan.getSpanContext().getSpanId())
35+ _ = assertThat(Span .current().getSpanContext().getTraceId())
36+ .isEqualTo(initialSpan.getSpanContext().getTraceId())
37+ _ = assertThat(Span .current().getSpanContext().getSpanId())
38+ .isEqualTo(initialSpan.getSpanContext().getSpanId())
3539 result2 <- after(200 .millis, system.scheduler)(Future .successful(2 ))
36- _ = assertThat(Span .current().getSpanContext().getTraceId()).isEqualTo(initialSpan.getSpanContext().getTraceId())
37- _ = assertThat(Span .current().getSpanContext().getSpanId()).isEqualTo(initialSpan.getSpanContext().getSpanId())
40+ _ = assertThat(Span .current().getSpanContext().getTraceId())
41+ .isEqualTo(initialSpan.getSpanContext().getTraceId())
42+ _ = assertThat(Span .current().getSpanContext().getSpanId())
43+ .isEqualTo(initialSpan.getSpanContext().getSpanId())
3844 } yield result1 + result2
3945 assertThat(Await .result(futureResult, 5 .seconds)).isEqualTo(3 )
4046 } finally {
0 commit comments