Alexander Rojas created MESOS-8991:
--------------------------------------

             Summary: `ObjectApprover::approved()` signature prevents it from 
being mockable
                 Key: MESOS-8991
                 URL: https://issues.apache.org/jira/browse/MESOS-8991
             Project: Mesos
          Issue Type: Task
          Components: modules
    Affects Versions: 1.6.0
            Reporter: Alexander Rojas


The 
[{{ObjectApprover::approved()}}|https://github.com/apache/mesos/blob/8b93fa3/include/mesos/authorizer/authorizer.hpp#L221]
 method has the following signature:

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

This is unfortunate since it is impossible to mock a function in google mock 
with [two 
qualifiers|https://groups.google.com/forum/#!topic/googlemock/LsbubY26qx4], 
which reduces the amount of tests we can perform.

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

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to