You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Laszlo Puskas <lp...@hortonworks.com> on 2017/05/25 10:01:20 UTC

Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

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

Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.


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


Repository: ambari


Description
-------

Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.

Using sorted collections to make messages predictable.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
  ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 


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


Testing
-------

Unit tests running. (Both java 7 and 8)


Thanks,

Laszlo Puskas


Re: Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59573/#review176066
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
Lines 148-149 (original), 150-151 (patched)
<https://reviews.apache.org/r/59573/#comment249387>

    Collections.singletonList or Lists.newArrayList(elements ...) can be used in places like this.



ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
Lines 206-207 (original), 208-209 (patched)
<https://reviews.apache.org/r/59573/#comment249388>

    Why not use Sets.newTreeSet(...) instead?


- Jonathan Hurley


On May 25, 2017, 6:01 a.m., Laszlo Puskas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59573/
> -----------------------------------------------------------
> 
> (Updated May 25, 2017, 6:01 a.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-21126
>     https://issues.apache.org/jira/browse/AMBARI-21126
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.
> 
> Using sorted collections to make messages predictable.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
>   ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 
> 
> 
> Diff: https://reviews.apache.org/r/59573/diff/1/
> 
> 
> Testing
> -------
> 
> Unit tests running. (Both java 7 and 8)
> 
> 
> Thanks,
> 
> Laszlo Puskas
> 
>


Re: Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

Posted by Attila Doroszlai <ad...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59573/#review176056
-----------------------------------------------------------


Fix it, then Ship it!





ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java
Line 87 (original), 89 (patched)
<https://reviews.apache.org/r/59573/#comment249386>

    Can you please add `<>` to get rid of the unchecked warning, since you are already modifying this file?



ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java
Lines 148-149 (original), 150-151 (patched)
<https://reviews.apache.org/r/59573/#comment249385>

    * please use `<>` instead of `<String>`
    * please consider using `Collections.singletonList` for single item list


- Attila Doroszlai


On May 25, 2017, 12:01 p.m., Laszlo Puskas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/59573/
> -----------------------------------------------------------
> 
> (Updated May 25, 2017, 12:01 p.m.)
> 
> 
> Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-21126
>     https://issues.apache.org/jira/browse/AMBARI-21126
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.
> 
> Using sorted collections to make messages predictable.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
>   ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 
> 
> 
> Diff: https://reviews.apache.org/r/59573/diff/1/
> 
> 
> Testing
> -------
> 
> Unit tests running. (Both java 7 and 8)
> 
> 
> Thanks,
> 
> Laszlo Puskas
> 
>


Re: Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

Posted by Laszlo Puskas <lp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59573/
-----------------------------------------------------------

(Updated May 25, 2017, 2:44 p.m.)


Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.


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


Repository: ambari


Description
-------

Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.

Using sorted collections to make messages predictable.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
  ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 


Diff: https://reviews.apache.org/r/59573/diff/2/


Testing (updated)
-------

Unit tests passed.
Tests run: 4981, Failures: 0, Errors: 0, Skipped: 39


author	lpuskas <lp...@apache.org>	
Thu, 25 May 2017 11:52:59 +0200 (11:52 +0200)
committer	lpuskas <lp...@apache.org>	
Thu, 25 May 2017 16:42:20 +0200 (16:42 +0200)
commit	14acc0ae32a274184830a8e7bf847f5ede8ac953


Thanks,

Laszlo Puskas


Re: Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

Posted by Laszlo Puskas <lp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59573/
-----------------------------------------------------------

(Updated May 25, 2017, 2:39 p.m.)


Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.


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


Repository: ambari


Description
-------

Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.

Using sorted collections to make messages predictable.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
  ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 


Diff: https://reviews.apache.org/r/59573/diff/2/


Testing (updated)
-------

Unit tests passed.
Tests run: 4981, Failures: 0, Errors: 0, Skipped: 39


Thanks,

Laszlo Puskas


Re: Review Request 59573: Exception message in validator generated based on ordered collections in order to be predictable.

Posted by Laszlo Puskas <lp...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/59573/
-----------------------------------------------------------

(Updated May 25, 2017, 1:23 p.m.)


Review request for Ambari, Attila Doroszlai, Jonathan Hurley, and Sandor Magyari.


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


Repository: ambari


Description
-------

Assertions in the failing tests are mad on generated strings that were different due to the (unordered) collections used to generate them.

Using sorted collections to make messages predictable.


Diffs (updated)
-----

  ambari-server/src/main/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidator.java 759d9e9 
  ambari-server/src/test/java/org/apache/ambari/server/topology/validators/RequiredConfigPropertiesValidatorTest.java 8ead623 


Diff: https://reviews.apache.org/r/59573/diff/2/

Changes: https://reviews.apache.org/r/59573/diff/1-2/


Testing
-------

Unit tests running. (Both java 7 and 8)


Thanks,

Laszlo Puskas