mesos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Charles Reiss" <woggl...@gmail.com>
Subject Re: Review Request: Python Testcases for Webui
Date Fri, 20 Apr 2012 20:48:34 GMT

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


General issues:
- We don't seem to have an official Python style guide (oops?), but try to follow some approximation
of the Google python style guide but with 2-space indent (as this seems to be roughly what
other python files use). In particular, this means: wrap lines of more than 80 chars; blank
line between methods in classes; two blank lines before top-level declarations
- Move tests to src/webui/tests or src/tests/webui
- Add a script that runs the tests, and it as a test with if WEBUI \ TESTS += <the script>
\ endif -or- 
- Add all new files to EXTRA_DIST (or another automake-managed target) in Makefile.am (look
at how other test files are currently added). When you're done 'make distcheck' from the top-level
(warning: takes a long time) should not fail.



src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15700>

    Why?



src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15694>

    Try TestMaster or similar (unless you've integrated a coverage analysis).



src/webui/common/run_testcases.py
<https://reviews.apache.org/r/4823/#comment15697>

    Include the exception with the failure or rethrow it (and elsewhere).



src/webui/common/testcases.py
<https://reviews.apache.org/r/4823/#comment15695>

    Shouldn't we use a string literal that might be returned by the master?



src/webui/common/webui_lib.py
<https://reviews.apache.org/r/4823/#comment15696>

    I'm guessing this won't handle daylight saving transitions correctly.



src/webui/master/index.tpl
<https://reviews.apache.org/r/4823/#comment15701>

    Move logic so we can do framework['max_share']


- Charles


On 2012-04-20 08:36:23, terencekwt wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/4823/
> -----------------------------------------------------------
> 
> (Updated 2012-04-20 08:36:23)
> 
> 
> Review request for mesos and Charles Reiss.
> 
> 
> Summary
> -------
> 
> Python Testcases for webui
> 
> *added unit testcases for checking if the webui could break by inputing artificial test
jsons
> *should catch bugs if there syntax issues, or general cases where resources doesn't add
up correctly
> *moved most of the logic out of the bottle .tpl template file and into the common webui_lib.py
> 
> 
> This addresses bug MESOS-93.
>     https://issues.apache.org/jira/browse/MESOS-93
> 
> 
> Diffs
> -----
> 
>   src/webui/common/run_testcases.py PRE-CREATION 
>   src/webui/common/testcases.py PRE-CREATION 
>   src/webui/common/webui_lib.py 0c56fde 
>   src/webui/master/framework.tpl b29d2da 
>   src/webui/master/index.tpl 68ae313 
>   src/webui/slave/executor.tpl dd53464 
>   src/webui/slave/framework.tpl 9488da5 
>   src/webui/slave/index.tpl b2e2097 
> 
> Diff: https://reviews.apache.org/r/4823/diff
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> terencekwt
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message