Skip to content

Commit

Permalink
tests: Fix DBM Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM committed Dec 14, 2023
1 parent eff88d7 commit 6710b38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/Integration/DatabaseMonitoringTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use DDTrace\HookData;
use DDTrace\Integrations\DatabaseIntegrationHelper;
use DDTrace\Integrations\Integration;
use DDTrace\Tests\Common\IntegrationTestCase;
use DDTrace\Tests\Common\SpanAssertion;

Expand Down Expand Up @@ -62,7 +63,7 @@ public function testInjectionServiceMappingOnce()
try {
$hook = \DDTrace\install_hook(self::class . "::instrumented", function (HookData $hook) {
$span = $hook->span();
$span->service = "pdo";
Integration::handleInternalSpanServiceName($span, "pdo");
$span->name = "instrumented";
DatabaseIntegrationHelper::injectDatabaseIntegrationData($hook, 'mysql', 1);
});
Expand Down Expand Up @@ -94,7 +95,7 @@ public function testInjectionServiceMappingTwice()
try {
$hook = \DDTrace\install_hook(self::class . "::instrumented", function (HookData $hook) {
$span = $hook->span();
$span->service = "pdo";
Integration::handleInternalSpanServiceName($span, "pdo");
$span->name = "instrumented";
DatabaseIntegrationHelper::injectDatabaseIntegrationData($hook, 'mysql', 1);
});
Expand Down

0 comments on commit 6710b38

Please sign in to comment.