You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by GitBox <gi...@apache.org> on 2021/01/08 17:51:26 UTC

[GitHub] [hive] zabetak opened a new pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

zabetak opened a new pull request #1843:
URL: https://github.com/apache/hive/pull/1843


   ### What changes were proposed in this pull request?
   New JUnit annotation for running/skipping tests when ports are available/taken
   
   ### Why are the changes needed?
   Avoid unexpected failures in tests when ports required in tests are taken.
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   ### How was this patch tested?
   `mvn test -pl testutils -Dtest=TestEnabledIfPortsAvailableCondition`
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 1
   ```
   nc -l 2001 &
   mvn test -pl testutils -Dtest=TestEnabledIfPortsAvailableCondition
   ```
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 2
   ```
   nc -l 5050 &
   mvn test -pl testutils -Dtest=TestEnabledIfPortsAvailableCondition
   ```
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 3
   ```
   nc -l 2000 &
   mvn test -pl testutils -Dtest=TestEnabledIfPortsAvailableCondition
   ```
   [WARNING] Tests run: 3, Failures: 0, Errors: 0, Skipped: 3


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak commented on pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
zabetak commented on pull request #1843:
URL: https://github.com/apache/hive/pull/1843#issuecomment-757383120


   > How are you planning to use this annotation? I mean are there going to be tests which will be skipped if the ports are not available? That would mean that patches that are breaking some tests may be merged in the event the test that is broken is just skipped due to the used port!
   
   Hey @miklosgergely, thanks for taking a look. In my mind, I wanted to avoid things that fail locally on local dev environment cause people have things bounded on different ports all the time. 
   
   After some thinking though, I agree with you that skipping tests under these conditions may not be a good idea since it might hide some more serious problems. For the particular use-case where I was planning to use the annotation I found an alternative approach that I like more thus I am closing this PR.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak commented on pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
zabetak commented on pull request #1843:
URL: https://github.com/apache/hive/pull/1843#issuecomment-757383120


   > How are you planning to use this annotation? I mean are there going to be tests which will be skipped if the ports are not available? That would mean that patches that are breaking some tests may be merged in the event the test that is broken is just skipped due to the used port!
   
   Hey @miklosgergely, thanks for taking a look. In my mind, I wanted to avoid things that fail locally on local dev environment cause people have things bounded on different ports all the time. 
   
   After some thinking though, I agree with you that skipping tests under these conditions may not be a good idea since it might hide some more serious problems. For the particular use-case where I was planning to use the annotation I found an alternative approach that I like more thus I am closing this PR.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] miklosgergely commented on pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
miklosgergely commented on pull request #1843:
URL: https://github.com/apache/hive/pull/1843#issuecomment-756914601


   How are you planning to use this annotation? I mean are there going to be tests which will be skipped if the ports are not available? That would mean that patches that are breaking some tests may be merged in the event the test that is broken is just skipped due to the used port!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak closed pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
zabetak closed pull request #1843:
URL: https://github.com/apache/hive/pull/1843


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] zabetak closed pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
zabetak closed pull request #1843:
URL: https://github.com/apache/hive/pull/1843


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org


[GitHub] [hive] miklosgergely commented on pull request #1843: HIVE-24607: Add JUnit annotation for running tests only if ports are available

Posted by GitBox <gi...@apache.org>.
miklosgergely commented on pull request #1843:
URL: https://github.com/apache/hive/pull/1843#issuecomment-756914601


   How are you planning to use this annotation? I mean are there going to be tests which will be skipped if the ports are not available? That would mean that patches that are breaking some tests may be merged in the event the test that is broken is just skipped due to the used port!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org