Skip to content

Commit

Permalink
Improve readability of event order preservation test
Browse files Browse the repository at this point in the history
  • Loading branch information
yuktea committed May 6, 2022
1 parent ed4352b commit a9270a4
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/Unit/SDK/Trace/SpanTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -710,11 +710,10 @@ public function test_add_event_order_preserved(): void
$span->end();

$events = $span->toSpanData()->getEvents();
$c = 0;

$this->assertEvent($events[$c++], 'a', new Attributes(), self::START_EPOCH);
$this->assertEvent($events[$c++], 'b', new Attributes(), self::START_EPOCH);
$this->assertEvent($events[$c], 'c', new Attributes(['key' => 2]), self::START_EPOCH);
$this->assertEvent($events[0], 'a', new Attributes(), self::START_EPOCH);
$this->assertEvent($events[1], 'b', new Attributes(), self::START_EPOCH);
$this->assertEvent($events[2], 'c', new Attributes(['key' => 2]), self::START_EPOCH);
}

private function createTestRootSpan(): Span
Expand Down

0 comments on commit a9270a4

Please sign in to comment.