> On June 7, 2016, 10:12 a.m., haosdent huang wrote:
> >

Haosdent, it is already getting validated inside: Master::Http::api -

See, what happens if we don't set set_quota in unit tests:

Value of: (response).get().status
  Actual: "400 Bad Request"
Expected: OK().status
Which is: "200 OK"
Failed to validate v1::master::Call: Expecting 'set_quota' to be present
../../src/tests/api_tests.cpp:406: Failure
Value of: (response).get().status
  Actual: "200 OK"
Expected: BadRequest().status
Which is: "400 Bad Request"
[  FAILED  ] ContentType/MasterAPITest.SetQuota/0, where GetParam() = 
application/x-protobuf (136 ms)
[ RUN      ] ContentType/MasterAPITest.SetQuota/1
../../src/tests/api_tests.cpp:250: Failure
Value of: (response).get().status
  Actual: "400 Bad Request"
Expected: OK().status
Which is: "200 OK"
Failed to validate v1::master::Call: Expecting 'set_quota' to be present
../../src/tests/api_tests.cpp:406: Failure
Value of: (response).get().status
  Actual: "200 OK"
Expected: BadRequest().status
Which is: "400 Bad Request"
[  FAILED  ] ContentType/MasterAPITest.SetQuota/1, where GetParam() = 
application/json (95 ms)
[----------] 2 tests from ContentType/MasterAPITest (232 ms total)

[----------] Global test environment tear-down
[==========] 2 tests from 1 test case ran. (261 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 2 tests, listed below:
[  FAILED  ] ContentType/MasterAPITest.SetQuota/0, where GetParam() = 
application/x-protobuf
[  FAILED  ] ContentType/MasterAPITest.SetQuota/1, where GetParam() = 
application/json


Should we need to check again if set_quota is set in call??


- Abhishek


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/48268/#review136444
-----------------------------------------------------------


On June 6, 2016, 9:55 a.m., Abhishek Dasgupta wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/48268/
> -----------------------------------------------------------
> 
> (Updated June 6, 2016, 9:55 a.m.)
> 
> 
> Review request for mesos, Anand Mazumdar and Vinod Kone.
> 
> 
> Bugs: MESOS-5509
>     https://issues.apache.org/jira/browse/MESOS-5509
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Implemented SET_QUOTA Call in v1 master API. This call
> does not return v1::Response message, instead it returns
> http::Response.
> 
> 
> Diffs
> -----
> 
>   include/mesos/v1/quota/quota.hpp PRE-CREATION 
>   src/Makefile.am c0be66ab28c452e217fe7c7ead8b1b3c283908cc 
>   src/internal/devolve.hpp 00842bb0de1dd587f2b47c79f17c0e7bd7f51189 
>   src/internal/devolve.cpp 4233246c6838f85189f1b4c7e66d2bc0a3bf5408 
>   src/internal/evolve.hpp 66a3deaa94939ad2233d944ba35ac7e5cbe682e7 
>   src/internal/evolve.cpp c255195b69f55f6429beed6c18a4a31b38528840 
>   src/master/http.cpp 824c6e5adcebc83d1ec742c9bd036a8f24c9a343 
>   src/master/master.hpp 846edf37d13b44093832ca3d184426b403174b35 
>   src/master/quota_handler.cpp 06cf0d3f24844ec9e884237db3f33145ff406e80 
>   src/tests/api_tests.cpp 3a482ca2a640b3f3e3b08a80ac84068d7e9ff8b0 
> 
> Diff: https://reviews.apache.org/r/48268/diff/
> 
> 
> Testing
> -------
> 
> On Ubuntu 16.04:
> sudo GTEST_FILTER="*MasterAPITest.SetQuota*" make -j4 check
> 
> [==========] Running 2 tests from 1 test case.
> [----------] Global test environment set-up.
> [----------] 2 tests from ContentType/MasterAPITest
> [ RUN      ] ContentType/MasterAPITest.SetQuota/0
> [       OK ] ContentType/MasterAPITest.SetQuota/0 (129 ms)
> [ RUN      ] ContentType/MasterAPITest.SetQuota/1
> [       OK ] ContentType/MasterAPITest.SetQuota/1 (98 ms)
> [----------] 2 tests from ContentType/MasterAPITest (227 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 2 tests from 1 test case ran. (236 ms total)
> [  PASSED  ] 2 tests.
> 
> 
> Thanks,
> 
> Abhishek Dasgupta
> 
>

Reply via email to