Skip to content

Commit bb48fed

Browse files
committed
Fix tests
1 parent b7d38b9 commit bb48fed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/FunctionsTest.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,7 @@ public function testBaggageWithTracingDisabled(): void
503503
{
504504
$propagationContext = PropagationContext::fromDefaults();
505505
$propagationContext->setTraceId(new TraceId('566e3688a61d4bc888951642d6f14a19'));
506+
$propagationContext->setSampleRand(0.25);
506507

507508
$scope = new Scope($propagationContext);
508509

@@ -520,7 +521,7 @@ public function testBaggageWithTracingDisabled(): void
520521

521522
$baggage = getBaggage();
522523

523-
$this->assertSame('sentry-trace_id=566e3688a61d4bc888951642d6f14a19,sentry-release=1.0.0,sentry-environment=development', $baggage);
524+
$this->assertSame('sentry-trace_id=566e3688a61d4bc888951642d6f14a19,sentry-sample_rand=0.25,sentry-release=1.0.0,sentry-environment=development', $baggage);
524525
}
525526

526527
public function testBaggageWithTracingEnabled(): void
@@ -541,6 +542,7 @@ public function testBaggageWithTracingEnabled(): void
541542
$transactionContext = new TransactionContext();
542543
$transactionContext->setName('Test');
543544
$transactionContext->setTraceId(new TraceId('566e3688a61d4bc888951642d6f14a19'));
545+
$transactionContext->getMetadata()->setSampleRand(0.25);
544546

545547
$transaction = startTransaction($transactionContext);
546548

@@ -552,7 +554,7 @@ public function testBaggageWithTracingEnabled(): void
552554

553555
$baggage = getBaggage();
554556

555-
$this->assertSame('sentry-trace_id=566e3688a61d4bc888951642d6f14a19,sentry-sample_rate=1,sentry-transaction=Test,sentry-release=1.0.0,sentry-environment=development,sentry-sampled=true', $baggage);
557+
$this->assertSame('sentry-trace_id=566e3688a61d4bc888951642d6f14a19,sentry-sample_rate=1,sentry-transaction=Test,sentry-release=1.0.0,sentry-environment=development,sentry-sampled=true,sentry-sample_rand=0.25', $baggage);
556558
}
557559

558560
public function testContinueTrace(): void

0 commit comments

Comments
 (0)