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




src/tests/common/http_tests.cpp
Lines 115-119 (patched)
<https://reviews.apache.org/r/72262/#comment308352>

    I think it should be something like:
    ```
          "  \"limits\":"
          "  {"
          "    \"cpus\":1.0,"
          "    \"mem\":32"
          "  },"
    ```
    so that the format of limits will be consistent with the format of 
resources:
    ```
          "  \"resources\":"
          "  {"
          "    \"cpus\":0,"
          "    \"disk\":0,"
          "    \"gpus\":0,"
          "    \"mem\":0"
          "  },"
    ```
    
    Actually after applying this patch, what I get from the master's `/tasks` 
endpoint is like the below which I think is correct. So that's why I think we 
should have the same result in this test, which means we may need to change the 
implementation of the function `JSON::Object model(const 
google::protobuf::Map<string, Value_Scalar>& map)`.
    ```
         "resources": {
            "disk": 0,
            "mem": 128,
            "gpus": 0,
            "cpus": 1
          },
          "limits": {
            "mem": 256,
            "cpus": 2
          },
    ```


- Qian Zhang


On March 24, 2020, 11:54 a.m., Greg Mann wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/72262/
> -----------------------------------------------------------
> 
> (Updated March 24, 2020, 11:54 a.m.)
> 
> 
> Review request for mesos and Qian Zhang.
> 
> 
> Bugs: MESOS-10087
>     https://issues.apache.org/jira/browse/MESOS-10087
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Added resource limits to v0 endpoint results.
> 
> 
> Diffs
> -----
> 
>   src/common/http.hpp 02633e175c0848ee622cb5108a2e18db5e030641 
>   src/common/http.cpp 3dd77dc826d2b1606a78c42ff0fac5794f2a3805 
>   src/tests/common/http_tests.cpp 5f3652732641f763343f98651dab2472131b38e3 
>   src/tests/master_tests.cpp 617abfa0a97f27c8cbe6aa6eb5345c5c07d3097f 
> 
> 
> Diff: https://reviews.apache.org/r/72262/diff/1/
> 
> 
> Testing
> -------
> 
> `make check`
> 
> 
> Thanks,
> 
> Greg Mann
> 
>

Reply via email to