Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions tests/debugging/exploration/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from ddtrace.debugging._function.discovery import FunctionDiscovery
from ddtrace.debugging._probe.model import ConditionalProbe
from ddtrace.debugging._probe.model import Probe
from ddtrace.debugging._probe.poller import ProbePollerEvent
from ddtrace.debugging._probe.remoteconfig import ProbePollerEvent
from ddtrace.debugging._snapshot.collector import SnapshotCollector
from ddtrace.debugging._snapshot.collector import SnapshotContext
from ddtrace.debugging._snapshot.model import Snapshot
Expand Down Expand Up @@ -232,17 +232,17 @@ def get_triggered_probes(cls):
@classmethod
def add_probe(cls, probe):
# type: (Probe) -> None
cls._instance._on_poller_event(ProbePollerEvent.NEW_PROBES, [probe])
cls._instance._on_configuration(ProbePollerEvent.NEW_PROBES, [probe])

@classmethod
def add_probes(cls, probes):
# type: (t.List[Probe]) -> None
cls._instance._on_poller_event(ProbePollerEvent.NEW_PROBES, probes)
cls._instance._on_configuration(ProbePollerEvent.NEW_PROBES, probes)

@classmethod
def delete_probe(cls, probe):
# type: (Probe) -> None
cls._instance._on_poller_event(ProbePollerEvent.DELETED_PROBES, [probe])
cls._instance._on_configuration(ProbePollerEvent.DELETED_PROBES, [probe])


if asbool(os.getenv("DD_DEBUGGER_EXPL_STATUS_MESSAGES", False)):
Expand Down
52 changes: 52 additions & 0 deletions tests/debugging/exploration/test_bootstrap.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
from os.path import dirname

import pytest

from ddtrace.internal.compat import PY2


if PY2:
OUT = """Enabling debugging exploration testing
========================== LineCoverage: probes stats ==========================

Installed probes: 0/0

================================ Line coverage =================================

Source Lines Covered
==========================================================================
No lines found
===================== DeterministicProfiler: probes stats ======================

Installed probes: 0/0

============================== Function coverage ===============================

No functions called
"""
else:
OUT = """Enabling debugging exploration testing
===================== DeterministicProfiler: probes stats ======================

Installed probes: 0/0

============================== Function coverage ===============================

No functions called
========================== LineCoverage: probes stats ==========================

Installed probes: 0/0

================================ Line coverage =================================

Source Lines Covered
==========================================================================
No lines found
"""


@pytest.mark.subprocess(env={"PYTHONPATH": dirname(__file__)}, out=OUT)
def test_exploration_bootstrap():
# We test that we get the expected output from the exploration debuggers
# and no errors when running the sitecustomize.py script.
pass