diff --git a/tests/debugging/exploration/debugger.py b/tests/debugging/exploration/debugger.py index ce1c63667f7..7185acd82a4 100644 --- a/tests/debugging/exploration/debugger.py +++ b/tests/debugging/exploration/debugger.py @@ -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 @@ -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)): diff --git a/tests/debugging/exploration/test_bootstrap.py b/tests/debugging/exploration/test_bootstrap.py new file mode 100644 index 00000000000..67ac04bcf65 --- /dev/null +++ b/tests/debugging/exploration/test_bootstrap.py @@ -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