Skip to content

Commit

Permalink
tests: Always Delete and Create the socket
Browse files Browse the repository at this point in the history
  • Loading branch information
PROFeNoM committed Feb 16, 2024
1 parent 39eb121 commit e5451f7
Showing 1 changed file with 4 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,12 @@ DD_AGENT_HOST=
include __DIR__ . '/../includes/request_replayer.inc';
include_once __DIR__ . '/../startup_logging.inc';

if (!file_exists("/var/run/datadog/apm.socket")) {
RequestReplayer::launchUnixProxy("/var/run/datadog/apm.socket");
} else {
$socket = stream_socket_client("unix:///var/run/datadog/apm.socket");
if (!$socket) {
RequestReplayer::launchUnixProxy("/var/run/datadog/apm.socket");
} else {
fclose($socket);
}
if (file_exists("/var/run/datadog/apm.socket")) {
unlink("/var/run/datadog/apm.socket");
}

RequestReplayer::launchUnixProxy("/var/run/datadog/apm.socket");

$logs = dd_get_startup_logs([], ['DD_TRACE_LOG_LEVEL=error,startup=info']);

dd_dump_startup_logs($logs, [
Expand Down

0 comments on commit e5451f7

Please sign in to comment.