You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Michael Park (JIRA)" <ji...@apache.org> on 2014/12/18 21:10:14 UTC

[jira] [Comment Edited] (MESOS-1064) Add tests for validation visitors in master

    [ https://issues.apache.org/jira/browse/MESOS-1064?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14252163#comment-14252163 ] 

Michael Park edited comment on MESOS-1064 at 12/18/14 8:09 PM:
---------------------------------------------------------------

If you're talking about {{bind}} in {{<functional>}}, it does copy arguments and that's exactly why {{ref}} and {{cref}} exist. For reference: http://en.cppreference.com/w/cpp/utility/functional/ref
I used {{std::string}} which copy for {{framework}} and {{slave}} in my example above but we can capture them by reference instead by changing the constructor and member variables.
In terms of construction of validators not being uniform, I'm not sure what the concern is there. If we want the validators to only take what they care about, it's gotta to be non-uniform _somewhere_.


was (Author: mcypark):
If you're talking about {{bind}} in {{<functional>}}, it does copy arguments and that's exactly why {{ref}} and {{cref}} exist. For reference: http://en.cppreference.com/w/cpp/utility/functional/ref
I used {{std::string}} which copy for {{framework}} and {{slave}} in my example above but we can capture them by reference instead by changing the constructor and member variables.
In terms of construction of validators not being uniform, I'm not sure what the concern is there. If we want the validators to only take what they care about, it's gotta to be non-uniform *somewhere*.

> Add tests for validation visitors in master
> -------------------------------------------
>
>                 Key: MESOS-1064
>                 URL: https://issues.apache.org/jira/browse/MESOS-1064
>             Project: Mesos
>          Issue Type: Improvement
>          Components: master, test
>            Reporter: Dominic Hamon
>            Assignee: Dominic Hamon
>            Priority: Minor
>              Labels: c++, newbie, unit-test
>
> The various TaskInfoVisitor and OfferVisitor structures that are used for validation are untested. They should be pulled out from master.cpp into their own header(s) and unit tests need to be added.
> A rename to *Validator would be useful to as that's what they're used for.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)