mesos-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Rukletsov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (MESOS-8094) Leverage helper functions to reduce boilerplate code related to v1 API.
Date Thu, 18 Jan 2018 12:40:00 GMT

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

Alexander Rukletsov commented on MESOS-8094:
--------------------------------------------

{noformat}
commit 634c8af2618c57a1405d20717fa909b399486f37
Author:     Armand Grillet <agrillet@mesosphere.io>
AuthorDate: Thu Jan 18 13:37:16 2018 +0100
Commit:     Alexander Rukletsov <alexr@apache.org>
CommitDate: Thu Jan 18 13:37:16 2018 +0100

    Updated tests to use `createCallSubscribe`.
    
    Update all the tests that send v1 API SUBSCRIBE calls
    to use the `createCallSubscribe` test helper.
    
    Review: https://reviews.apache.org/r/63661/
{noformat}

> Leverage helper functions to reduce boilerplate code related to v1 API.
> -----------------------------------------------------------------------
>
>                 Key: MESOS-8094
>                 URL: https://issues.apache.org/jira/browse/MESOS-8094
>             Project: Mesos
>          Issue Type: Improvement
>          Components: test
>            Reporter: Alexander Rukletsov
>            Priority: Major
>              Labels: mesosphere, newbie
>
> https://reviews.apache.org/r/61982/ created an example how test code related to scheduler
v1 API can be simplified with appropriate usage of helper function. For example, instead of
crafting a subscribe call manually like in
> {noformat}
>   {
>     v1::scheduler::Call call;
>     call.set_type(v1::scheduler::Call::SUBSCRIBE);
>     v1::scheduler::Call::Subscribe* subscribe = call.mutable_subscribe();
>     subscribe->mutable_framework_info()->CopyFrom(v1::DEFAULT_FRAMEWORK_INFO);
>     mesos.send(call);
>   }
> {noformat}
> a helper function {{v1::scheduler::SendSubscribe()}} shall be invoked.
> To find all occurrences that shall be fixed, one can grep the test codebase for {{call.set_type}}.
At the moment I see the following files:
> {noformat}
> api_tests.cpp
> check_tests.cpp
> http_fault_tolerant_tests.cpp
> master_maintenance_tests.cpp
> master_tests.cpp
> scheduler_tests.cpp
> slave_authorization_tests.cpp
> slave_recovery_tests.cpp
> slave_tests.cpp
> {noformat}
> The same applies for sending status update acks; {{v1::scheduler::SendAcknowledge()}}
action shall be used instead of manually crafting acks.



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

Mime
View raw message