Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-10 Thread Alexander Rukletsov

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

(Updated Feb. 10, 2016, 3:56 p.m.)


Review request for mesos, Michael Park and Qian Zhang.


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


Repository: mesos


Description
---

The `AvailableResourcesAfterRescinding` test became flaky after we
stopped offering unreserved resources beyond quota in
https://reviews.apache.org/r/42835. Hence the allocator offers
rescinded resources to `framework1` if an allocation happens before
the test finishes, which violates the expectation that `framework1`
receives resources only once. Since we do not really care about
allocations in this test but rather about rescinded resources, the
fix is just to ignore subsequent offers to `framework1`.


Diffs (updated)
-

  src/tests/master_quota_tests.cpp 2255fc230f0821eeaba332997f30ff9922e4f317 

Diff: https://reviews.apache.org/r/42908/diff/


Testing
---

On Mac OS 10.10.4:
`GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
--gtest_repeat=5000`


Thanks,

Alexander Rukletsov



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-10 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [43422, 42908]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Feb. 10, 2016, 3:56 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Feb. 10, 2016, 3:56 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 2255fc230f0821eeaba332997f30ff9922e4f317 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-10 Thread Michael Park


> On Feb. 10, 2016, 2:04 a.m., Michael Park wrote:
> > src/tests/master_quota_tests.cpp, lines 993-1000
> > 
> >
> > Did we not need these before for some reason?
> 
> Alexander Rukletsov wrote:
> We did, it was a bug. I believe you mean we should then split the review 
> in two: bugfix and logics update.

Ah I see. I wasn't implying anything, was actually asking a question. But great 
to have them split, thanks! :)


- Michael


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


On Feb. 10, 2016, 3:56 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Feb. 10, 2016, 3:56 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 2255fc230f0821eeaba332997f30ff9922e4f317 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-10 Thread Alexander Rukletsov


> On Feb. 5, 2016, 3:11 a.m., Till Toenshoff wrote:
> > src/tests/master_quota_tests.cpp, line 901
> > 
> >
> > I feel this comment as-is does not add much.
> > 
> > Either removing it or supplying a reasoning in that comment would be 
> > more helpful, no?

Yeah, I've just followed the pattern here, but you're right it's not good 
enough.


- Alexander


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


On Jan. 29, 2016, 10:34 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-10 Thread Alexander Rukletsov


> On Feb. 10, 2016, 2:04 a.m., Michael Park wrote:
> > src/tests/master_quota_tests.cpp, lines 993-1000
> > 
> >
> > Did we not need these before for some reason?

We did, it was a bug. I believe you mean we should then split the review in 
two: bugfix and logics update.


> On Feb. 10, 2016, 2:04 a.m., Michael Park wrote:
> > src/tests/master_quota_tests.cpp, lines 990-991
> > 
> >
> > Is this comment generally applied to the test? or is it related to the 
> > sequence of `stop` and `join` below? If it's the latter, could you explain 
> > how they're related?

No, it's unrelated to the sequence of `stop` and `join`. I see it confuses the 
reader at this point, I'll move it higher above where we set expectations.


- Alexander


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


On Jan. 29, 2016, 10:34 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-09 Thread Michael Park

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




src/tests/master_quota_tests.cpp (lines 990 - 991)


Is this comment generally applied to the test? or is it related to the 
sequence of `stop` and `join` below? If it's the latter, could you explain how 
they're related?



src/tests/master_quota_tests.cpp (lines 993 - 1000)


Did we not need these before for some reason?


- Michael Park


On Jan. 29, 2016, 10:34 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-04 Thread Till Toenshoff

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



lgtm


src/tests/master_quota_tests.cpp (line 901)


I feel this comment as-is does not add much.

Either removing it or supplying a reasoning in that comment would be more 
helpful, no?


- Till Toenshoff


On Jan. 29, 2016, 10:34 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-02-04 Thread Mesos ReviewBot

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



Patch looks great!

Reviews applied: [42908]

Passed command: export OS='ubuntu:14.04' CONFIGURATION='--verbose' 
COMPILER='gcc' ENVIRONMENT='GLOG_v=1 MESOS_VERBOSE=1'; ./support/docker_build.sh

- Mesos ReviewBot


On Jan. 29, 2016, 10:34 a.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 10:34 a.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-01-29 Thread Klaus Ma


> On Jan. 29, 2016, 4:42 p.m., Klaus Ma wrote:
> > src/tests/master_quota_tests.cpp, line 957
> > 
> >
> > Just check the code on `setQuota-->rescindOffer`, why not let allocator 
> > to do the `rescindOffer`? It makes sense to let allocator to descide how 
> > many resources/offer should be rescind.
> 
> Alexander Rukletsov wrote:
> If I understand you correctly, then it's because the allocator should 
> manage offers. Currently, the allocator allocates resources which are packed 
> into offers by the master. Moving this to allocator is quite a bit of 
> refactoring, agreed? Do you propose to do this refactoring as part of the 
> patch? I'm not sure how schould I "fix" the issue.

Yes, I agree it's quite a bit of refactoring; we definely not "fix" it in this 
path :). I thinke we can log a JIRA to discuss it: whether it worth to do; if 
worth, how. Is that OK?


- Klaus


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


On Jan. 29, 2016, 6:34 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 6:34 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-01-29 Thread Alexander Rukletsov

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

(Updated Jan. 29, 2016, 10:34 a.m.)


Review request for mesos, Michael Park and Qian Zhang.


Changes
---

Addressed Klaus' comment.


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


Repository: mesos


Description
---

The `AvailableResourcesAfterRescinding` test became flaky after we
stopped offering unreserved resources beyond quota in
https://reviews.apache.org/r/42835. Hence the allocator offers
rescinded resources to `framework1` if an allocation happens before
the test finishes, which violates the expectation that `framework1`
receives resources only once. Since we do not really care about
allocations in this test but rather about rescinded resources, the
fix is just to ignore subsequent offers to `framework1`.


Diffs (updated)
-

  src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 

Diff: https://reviews.apache.org/r/42908/diff/


Testing
---

On Mac OS 10.10.4:
`GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
--gtest_repeat=5000`


Thanks,

Alexander Rukletsov



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-01-29 Thread Alexander Rukletsov


> On Jan. 29, 2016, 8:42 a.m., Klaus Ma wrote:
> > src/tests/master_quota_tests.cpp, line 957
> > 
> >
> > Just check the code on `setQuota-->rescindOffer`, why not let allocator 
> > to do the `rescindOffer`? It makes sense to let allocator to descide how 
> > many resources/offer should be rescind.

If I understand you correctly, then it's because the allocator should manage 
offers. Currently, the allocator allocates resources which are packed into 
offers by the master. Moving this to allocator is quite a bit of refactoring, 
agreed? Do you propose to do this refactoring as part of the patch? I'm not 
sure how schould I "fix" the issue.


> On Jan. 29, 2016, 8:42 a.m., Klaus Ma wrote:
> > src/tests/master_quota_tests.cpp, line 992
> > 
> >
> > ```
> > driver.stop();
> > driver.join();
> > ```

Good catch, thanks!


- Alexander


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


On Jan. 28, 2016, 12:20 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 28, 2016, 12:20 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-01-29 Thread Klaus Ma

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




src/tests/master_quota_tests.cpp (line 957)


Just check the code on `setQuota-->rescindOffer`, why not let allocator to 
do the `rescindOffer`? It makes sense to let allocator to descide how many 
resources/offer should be rescind.



src/tests/master_quota_tests.cpp (line 992)


```
driver.stop();
driver.join();
```


- Klaus Ma


On Jan. 28, 2016, 8:20 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 28, 2016, 8:20 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>



Re: Review Request 42908: Fixed a flaky test in quota tests.

2016-01-29 Thread Klaus Ma


> On Jan. 29, 2016, 4:42 p.m., Klaus Ma wrote:
> > src/tests/master_quota_tests.cpp, line 957
> > 
> >
> > Just check the code on `setQuota-->rescindOffer`, why not let allocator 
> > to do the `rescindOffer`? It makes sense to let allocator to descide how 
> > many resources/offer should be rescind.
> 
> Alexander Rukletsov wrote:
> If I understand you correctly, then it's because the allocator should 
> manage offers. Currently, the allocator allocates resources which are packed 
> into offers by the master. Moving this to allocator is quite a bit of 
> refactoring, agreed? Do you propose to do this refactoring as part of the 
> patch? I'm not sure how schould I "fix" the issue.
> 
> Klaus Ma wrote:
> Yes, I agree it's quite a bit of refactoring; we definely not "fix" it in 
> this path :). I thinke we can log a JIRA to discuss it: whether it worth to 
> do; if worth, how. Is that OK?

I log MESOS-4553 for our discussion, I'd like to drop this comments :).


- Klaus


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


On Jan. 29, 2016, 6:34 p.m., Alexander Rukletsov wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/42908/
> ---
> 
> (Updated Jan. 29, 2016, 6:34 p.m.)
> 
> 
> Review request for mesos, Michael Park and Qian Zhang.
> 
> 
> Bugs: MESOS-4542
> https://issues.apache.org/jira/browse/MESOS-4542
> 
> 
> Repository: mesos
> 
> 
> Description
> ---
> 
> The `AvailableResourcesAfterRescinding` test became flaky after we
> stopped offering unreserved resources beyond quota in
> https://reviews.apache.org/r/42835. Hence the allocator offers
> rescinded resources to `framework1` if an allocation happens before
> the test finishes, which violates the expectation that `framework1`
> receives resources only once. Since we do not really care about
> allocations in this test but rather about rescinded resources, the
> fix is just to ignore subsequent offers to `framework1`.
> 
> 
> Diffs
> -
> 
>   src/tests/master_quota_tests.cpp 04efcf3362d3594e0ad8077793fa1f32536dd658 
> 
> Diff: https://reviews.apache.org/r/42908/diff/
> 
> 
> Testing
> ---
> 
> On Mac OS 10.10.4:
> `GTEST_FILTER="MasterQuotaTest.AvailableResourcesAfterRescinding" 
> ./bin/mesos-tests.sh --gtest_shuffle --gtest_break_on_failure 
> --gtest_repeat=5000`
> 
> 
> Thanks,
> 
> Alexander Rukletsov
> 
>