I may have brought up this issue in the past, however I’m bringing it again, 
The `ObjectApprover::approved()` [1] method has the following signature:

```
virtual Try<bool> approved(
      const Option<Object>& object) const noexcept = 0;
```

This is unfortunate since it is impossible to mock a function in google mock 
with two qualifiers [2] without some modifications to gmock itself. this 
reduces the amount of tests we can perform.

Moreover, the `noexcept` qualifier is not even needed in Mesos, since it does 
not use exceptions and it is compiled without exception support by default.

The tricky situation here is that this is a public API so it would be tricky to 
replace since it will break backwards compatibility. So I’m calling out to any 
modules developer to notify if they are ok with the change or if we should 
instead try to modify gmock.
 
[1] 
https://github.com/apache/mesos/blob/8b93fa3/include/mesos/authorizer/authorizer.hpp#L221
[2] https://groups.google.com/forum/#!topic/googlemock/LsbubY26qx4

 

Alexander Rojas
alexan...@mesosphere.io




Reply via email to