[ 
https://issues.apache.org/jira/browse/MESOS-8991?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Gavin updated MESOS-8991:
-------------------------
    Comment: was deleted

(was: www.rtat.net)

> `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
>            Priority: Major
>              Labels: authorization, mesosphere, modularization
>
> 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.
> The tricky situation here is that this is a public API so it would be tricky 
> to replace since it will break backwards compatibility.
>  
>  



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

Reply via email to