8#include <userver/engine/task/task_processor_fwd.hpp>
9#include <userver/formats/json/value.hpp>
10#include <userver/testsuite/testpoint_control.hpp>
13#include <fmt/format.h>
16#include <userver/rcu/rcu.hpp>
17#include <userver/utils/async.hpp>
19USERVER_NAMESPACE_BEGIN
23class TestpointScope
final {
28 explicit operator
bool()
const noexcept;
35 utils::FastPimpl<Impl, 24, 8> impl_;
38bool IsTestpointEnabled(std::string_view name);
40void ExecuteTestpointBlocking(
const std::string& name,
41 const formats::
json::Value& json,
43 engine::TaskProcessor& task_processor);
63#define TESTPOINT_CALLBACK(name, json, callback)
65 namespace tp = USERVER_NAMESPACE
::testsuite::impl;
66 if (!tp::IsTestpointEnabled(name)) break;
67 const tp::TestpointScope tp_scope;
70 tp_scope.GetClient().Execute(name, json, callback);
93#define TESTPOINT_CALLBACK_NONCORO(name, json, task_processor, callback)
95 namespace tp = USERVER_NAMESPACE
::testsuite::impl;
96 if (!tp::IsTestpointEnabled(name)) break;
97 tp::ExecuteTestpointBlocking(name, json, callback, task_processor);
105#define TESTPOINT_NONCORO(name, json, task_processor)