Removed currently unneeded 'AWAIT_READY's in 'MockResourceProvider'. The 'AWAIT_READY's in 'MockResourceProvider' let to the resource provider not being usable with paused clock as we would run into a deadclock in that case.
This patch removes the explicit awaits here to make this resource provider usable. We should consider making it easier to debug send failures in the resource provider, e.g., by surfacing the future responses to users in some way, or by added additional logging. Review: https://reviews.apache.org/r/64086/ Project: http://git-wip-us.apache.org/repos/asf/mesos/repo Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/a622d940 Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/a622d940 Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/a622d940 Branch: refs/heads/master Commit: a622d9406e46d574e31dd6ce7e1a31e56a3f294e Parents: 8ccbdb9 Author: Benjamin Bannier <[email protected]> Authored: Thu Nov 30 17:04:04 2017 +0100 Committer: Benjamin Bannier <[email protected]> Committed: Thu Nov 30 18:33:58 2017 +0100 ---------------------------------------------------------------------- src/tests/mesos.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/mesos/blob/a622d940/src/tests/mesos.hpp ---------------------------------------------------------------------- diff --git a/src/tests/mesos.hpp b/src/tests/mesos.hpp index 5fe5356..c871878 100644 --- a/src/tests/mesos.hpp +++ b/src/tests/mesos.hpp @@ -2904,7 +2904,7 @@ public: call.mutable_subscribe()->mutable_resource_provider_info()->set_name( "test"); - AWAIT_READY(driver->send(call)); + driver->send(call); } void subscribedDefault(const typename Event::Subscribed& subscribed) @@ -2927,7 +2927,7 @@ public: update->mutable_resources()->CopyFrom(injected); update->set_resource_version_uuid(UUID::random().toBytes()); - AWAIT_READY(driver->send(call)); + driver->send(call); } } @@ -3003,7 +3003,7 @@ public: update->mutable_latest_status()->CopyFrom(update->status()); - AWAIT_READY(driver->send(call)); + driver->send(call); } Option<ResourceProviderID> resourceProviderId;
