MCPcopy Create free account
hub / github.com/3rdparty/libprocess / FutureHttpRequest

Function FutureHttpRequest

include/process/gmock.hpp:445–466  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443
444template <typename Message, typename Path, typename Deserializer>
445Future<http::Request> FutureHttpRequest(
446 Message message,
447 Path path,
448 Deserializer deserializer,
449 bool drop = false)
450{
451 TestsFilter* filter = FilterTestEventListener::instance()->install();
452 Future<http::Request> future;
453 synchronized (filter->mutex) {
454 EXPECT_CALL(filter->mock, filter(
455 testing::A<const UPID&>(),
456 testing::A<const HttpEvent&>()))
457 .With(HttpMatcher(message, path, deserializer))
458 .WillOnce(testing::DoAll(FutureArgField<1>(
459 &HttpEvent::request,
460 &future),
461 testing::Return(drop)))
462 .RetiresOnSaturation(); // Don't impose any subsequent expectations.
463 }
464
465 return future;
466}
467
468
469template <typename Message,

Callers

nothing calls this directly

Calls 3

filterFunction · 0.85
synchronizedFunction · 0.50
installMethod · 0.45

Tested by

no test coverage detected