Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-21 Thread Attila Doroszlai

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

(Updated Sept. 21, 2016, 12:39 p.m.)


Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, and 
Sebastian Toader.


Changes
---

Rebased to current trunk


Bugs: AMBARI-18401
https://issues.apache.org/jira/browse/AMBARI-18401


Repository: ambari


Description
---

* Implement the Surefire approach for filtering unit tests to be run for Python.
 * Keep backward-compatibility for `custom.tests` flag and default test mask


Diffs (updated)
-

  ambari-server/pom.xml 5731c9d 
  ambari-server/src/test/python/unitTests.py 037b6a5 

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


Testing
---

```bash
git apply --include ambari-server/src/test/python/unitTests.py 
AMBARI-18401_20160915_v1.patch

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
# -> verify all Python unit tests were run (1126 as of now)

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify no Python unit tests were run

mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify only TestStackAdvisor was run (2 tests as of now)

mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
# -> verify all Python unit tests were run

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify no Python unit tests were run

mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify only TestStackAdvisor was run

mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
-Dpython.test.mask='TestS*py'
# -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 6 
files as of now)
```


Thanks,

Attila Doroszlai



Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-15 Thread Oliver Szabo

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


Ship it!




Ship It!

- Oliver Szabo


On Sept. 15, 2016, 5:36 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51914/
> ---
> 
> (Updated Sept. 15, 2016, 5:36 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18401
> https://issues.apache.org/jira/browse/AMBARI-18401
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> * Implement the Surefire approach for filtering unit tests to be run for 
> Python.
>  * Keep backward-compatibility for `custom.tests` flag and default test mask
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 323ce22 
>   ambari-server/src/test/python/unitTests.py 037b6a5 
> 
> Diff: https://reviews.apache.org/r/51914/diff/
> 
> 
> Testing
> ---
> 
> ```bash
> git apply --include ambari-server/src/test/python/unitTests.py 
> AMBARI-18401_20160915_v1.patch
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run (1126 as of now)
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run (2 tests as of now)
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
> -Dpython.test.mask='TestS*py'
> # -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 
> 6 files as of now)
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>



Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-15 Thread Alejandro Fernandez

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


Ship it!




Ship It!

- Alejandro Fernandez


On Sept. 15, 2016, 5:36 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51914/
> ---
> 
> (Updated Sept. 15, 2016, 5:36 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18401
> https://issues.apache.org/jira/browse/AMBARI-18401
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> * Implement the Surefire approach for filtering unit tests to be run for 
> Python.
>  * Keep backward-compatibility for `custom.tests` flag and default test mask
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 323ce22 
>   ambari-server/src/test/python/unitTests.py 037b6a5 
> 
> Diff: https://reviews.apache.org/r/51914/diff/
> 
> 
> Testing
> ---
> 
> ```bash
> git apply --include ambari-server/src/test/python/unitTests.py 
> AMBARI-18401_20160915_v1.patch
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run (1126 as of now)
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run (2 tests as of now)
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
> -Dpython.test.mask='TestS*py'
> # -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 
> 6 files as of now)
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>



Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-15 Thread Attila Doroszlai

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

(Updated Sept. 15, 2016, 7:36 p.m.)


Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, and 
Sebastian Toader.


Changes
---

Removed unnecessary condition according to Laszlo's review


Bugs: AMBARI-18401
https://issues.apache.org/jira/browse/AMBARI-18401


Repository: ambari


Description
---

* Implement the Surefire approach for filtering unit tests to be run for Python.
 * Keep backward-compatibility for `custom.tests` flag and default test mask


Diffs (updated)
-

  ambari-server/pom.xml 323ce22 
  ambari-server/src/test/python/unitTests.py 037b6a5 

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


Testing
---

```bash
git apply --include ambari-server/src/test/python/unitTests.py 
AMBARI-18401_20160915_v1.patch

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
# -> verify all Python unit tests were run (1126 as of now)

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify no Python unit tests were run

mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify only TestStackAdvisor was run (2 tests as of now)

mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
# -> verify all Python unit tests were run

mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify no Python unit tests were run

mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
# -> verify only TestStackAdvisor was run

mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
-Dpython.test.mask='TestS*py'
# -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 6 
files as of now)
```


Thanks,

Attila Doroszlai



Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-15 Thread Attila Doroszlai


> On Sept. 15, 2016, 5:55 p.m., Laszlo Puskas wrote:
> > ambari-server/src/test/python/unitTests.py, line 158
> > 
> >
> > Is the second conditin required here?

It turns out to be unnecessary (as long as the script is invoked via Maven).  
Tested with `-Dpython.test.mask=''`, the python script is not even invoked, 
Maven fails with this message:

```
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 
(python-test) on project ambari-server: Misconfigured argument, value is null. 
Set the argument to an empty value if this is the required behaviour.
```

Same result if the value is set to empty in the `pom.xml`.


- Attila


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


On Sept. 15, 2016, 4:44 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51914/
> ---
> 
> (Updated Sept. 15, 2016, 4:44 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18401
> https://issues.apache.org/jira/browse/AMBARI-18401
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> * Implement the Surefire approach for filtering unit tests to be run for 
> Python.
>  * Keep backward-compatibility for `custom.tests` flag and default test mask
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 323ce22 
>   ambari-server/src/test/python/unitTests.py 037b6a5 
> 
> Diff: https://reviews.apache.org/r/51914/diff/
> 
> 
> Testing
> ---
> 
> ```bash
> git apply --include ambari-server/src/test/python/unitTests.py 
> AMBARI-18401_20160915_v1.patch
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run (1126 as of now)
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run (2 tests as of now)
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
> -Dpython.test.mask='TestS*py'
> # -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 
> 6 files as of now)
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>



Re: Review Request 51914: AMBARI-18401 Allow running a subset of Python unit tests

2016-09-15 Thread Laszlo Puskas

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


Fix it, then Ship it!




Fix it then Ship it.


ambari-server/src/test/python/unitTests.py (line 153)


Is the second conditin required here?


- Laszlo Puskas


On Sept. 15, 2016, 2:44 p.m., Attila Doroszlai wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/51914/
> ---
> 
> (Updated Sept. 15, 2016, 2:44 p.m.)
> 
> 
> Review request for Ambari, Balázs Bence Sári, Laszlo Puskas, Oliver Szabo, 
> and Sebastian Toader.
> 
> 
> Bugs: AMBARI-18401
> https://issues.apache.org/jira/browse/AMBARI-18401
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> * Implement the Surefire approach for filtering unit tests to be run for 
> Python.
>  * Keep backward-compatibility for `custom.tests` flag and default test mask
> 
> 
> Diffs
> -
> 
>   ambari-server/pom.xml 323ce22 
>   ambari-server/src/test/python/unitTests.py 037b6a5 
> 
> Diff: https://reviews.apache.org/r/51914/diff/
> 
> 
> Testing
> ---
> 
> ```bash
> git apply --include ambari-server/src/test/python/unitTests.py 
> AMBARI-18401_20160915_v1.patch
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run (1126 as of now)
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run (2 tests as of now)
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> git apply --include ambari-server/pom.xml AMBARI-18401_20160915_v1.patch
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip
> # -> verify all Python unit tests were run
> 
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify no Python unit tests were run
> 
> mv -iv ambari-server/src/test/python/{,_}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip -Dcustom.tests
> # -> verify only TestStackAdvisor was run
> 
> mv -iv ambari-server/src/test/python/{_,}TestStackAdvisor.py
> mvn -pl ambari-server test -DskipSurefireTests -Drat.skip 
> -Dpython.test.mask='TestS*py'
> # -> verify only TestServerClassPath...TestStackFeature were run (30 tests in 
> 6 files as of now)
> ```
> 
> 
> Thanks,
> 
> Attila Doroszlai
> 
>