> On Dec. 14, 2015, 4:18 p.m., Alexander Rukletsov wrote:
> > src/tests/master_quota_tests.cpp, line 1002
> > <https://reviews.apache.org/r/39520/diff/7/?file=1158401#file1158401line1002>
> >
> >     This could fail if we ever enforce `MIN_MEM` check. How about 
> > "cpus:1;mem:512", which we use frequently in this test file.
> >     
> >     Here and below.
> 
> Till Toenshoff wrote:
>     Very good point indeed. Maybe we can avoid explicit magics entirely and 
> find a way to reference some kind of default resource values for the tests in 
> the form of a static string / proper constant?

An argument against introducing a constant here is verbosity: we try to be 
explicit about what's going on in the test. Also, we do use some constants for 
agent resources: `defaultAgentResources`. I would say using a magic number is 
fine as long as we ensure it's sane, for example by checking 
`EXPECT_TRUE(agentTotalResources.get().contains(Resources::parse("magic-numbers").get()));`.


- Alexander


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


On Dec. 15, 2015, 10:13 a.m., Jan Schlicht wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39520/
> -----------------------------------------------------------
> 
> (Updated Dec. 15, 2015, 10:13 a.m.)
> 
> 
> Review request for mesos, Alexander Rukletsov and Till Toenshoff.
> 
> 
> Bugs: MESOS-4082
>     https://issues.apache.org/jira/browse/MESOS-4082
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Quota: Added authentication, authorization tests.
> 
> 
> Diffs
> -----
> 
>   src/tests/authorization_tests.cpp f55e074806e7697e131fa6e8dc97fb9aaea3e365 
>   src/tests/master_quota_tests.cpp 12820fcf7c0d2a791071464ad8ed738664ad85de 
> 
> Diff: https://reviews.apache.org/r/39520/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jan Schlicht
> 
>

Reply via email to