|
|
|
@ -41,6 +41,7 @@ |
|
|
|
|
|
|
|
|
|
#include "src/core/lib/gprpp/no_destruct.h" |
|
|
|
|
#include "src/core/lib/gprpp/sync.h" |
|
|
|
|
#include "src/core/lib/gprpp/time.h" |
|
|
|
|
#include "test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.pb.h" |
|
|
|
|
#include "test/core/util/port.h" |
|
|
|
|
|
|
|
|
@ -59,6 +60,8 @@ class FuzzingEventEngine : public EventEngine { |
|
|
|
|
const fuzzing_event_engine::Actions& actions); |
|
|
|
|
~FuzzingEventEngine() override { UnsetGlobalHooks(); } |
|
|
|
|
|
|
|
|
|
using Time = std::chrono::time_point<FuzzingEventEngine, Duration>; |
|
|
|
|
|
|
|
|
|
// Once the fuzzing work is completed, this method should be called to speed
|
|
|
|
|
// quiescence.
|
|
|
|
|
void FuzzingDone() ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
@ -67,6 +70,14 @@ class FuzzingEventEngine : public EventEngine { |
|
|
|
|
ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
// Repeatedly call Tick() until there is no more work to do.
|
|
|
|
|
void TickUntilIdle() ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
// Tick until some time
|
|
|
|
|
void TickUntil(Time t) ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
// Tick until some gpr_timespec
|
|
|
|
|
void TickUntilTimespec(gpr_timespec t) ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
// Tick until some grpc_core::Timestamp
|
|
|
|
|
void TickUntilTimestamp(grpc_core::Timestamp t) ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
// Tick for some grpc_core::Duration
|
|
|
|
|
void TickForDuration(grpc_core::Duration d) ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
|
|
|
|
|
absl::StatusOr<std::unique_ptr<Listener>> CreateListener( |
|
|
|
|
Listener::AcceptCallback on_accept, |
|
|
|
@ -97,8 +108,6 @@ class FuzzingEventEngine : public EventEngine { |
|
|
|
|
ABSL_LOCKS_EXCLUDED(mu_) override; |
|
|
|
|
bool Cancel(TaskHandle handle) ABSL_LOCKS_EXCLUDED(mu_) override; |
|
|
|
|
|
|
|
|
|
using Time = std::chrono::time_point<FuzzingEventEngine, Duration>; |
|
|
|
|
|
|
|
|
|
Time Now() ABSL_LOCKS_EXCLUDED(mu_); |
|
|
|
|
|
|
|
|
|
// Clear any global hooks installed by this event engine. Call prior to
|
|
|
|
|