Re: Review Request 65845: Fixed broken test `SlavesEndpointFullResources`.

2018-03-01 Thread Benjamin Mahler

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


Ship it!





src/tests/persistent_volume_endpoints_tests.cpp
Line 2352 (original), 2352-2356 (patched)


Let's use -> instead of .get(). and CHECK_NOTERROR where we assume the get 
will succeed:

```
  EXPECT_EQ(
  Resources(CHECK_NOTERROR(
  Resources::fromJSON(expectedUnreserved->as(,
  Resources(CHECK_NOTERROR(
  Resources::fromJSON(unreservedValue.as();
```


- Benjamin Mahler


On Feb. 28, 2018, 9 p.m., Meng Zhu wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/65845/
> ---
> 
> (Updated Feb. 28, 2018, 9 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler and Michael Park.
> 
> 
> Bugs: MESOS-8456
> https://issues.apache.org/jira/browse/MESOS-8456
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The test relies on the order of the JSON array output and is broken
> after the recent allocator changes in #65821.
> This patch fixes this test by parsing the JSON array to resources,
> so that the comparison is order agnostic.
> 
> 
> Diffs
> -
> 
>   src/tests/persistent_volume_endpoints_tests.cpp 
> 94b8caac0c298d0e660b9bfe523b02a919f81594 
> 
> 
> Diff: https://reviews.apache.org/r/65845/diff/1/
> 
> 
> Testing
> ---
> 
> make check
> 
> 
> Thanks,
> 
> Meng Zhu
> 
>



Review Request 65845: Fixed broken test `SlavesEndpointFullResources`.

2018-02-28 Thread Meng Zhu

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

Review request for mesos, Benjamin Mahler and Michael Park.


Bugs: MESOS-8456
https://issues.apache.org/jira/browse/MESOS-8456


Repository: mesos


Description
---

The test relies on the order of the JSON array output and is broken
after the recent allocator changes in #65821.
This patch fixes this test by parsing the JSON array to resources,
so that the comparison is order agnostic.


Diffs
-

  src/tests/persistent_volume_endpoints_tests.cpp 
94b8caac0c298d0e660b9bfe523b02a919f81594 


Diff: https://reviews.apache.org/r/65845/diff/1/


Testing
---

make check


Thanks,

Meng Zhu