Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure isValid() will not last more than timeout seconds #1557

Merged
merged 5 commits into from Sep 5, 2019

Conversation

@arobert-delfingen
Copy link
Contributor

commented Sep 3, 2019

This PR is to just to give an idea how to fix issue #1556, but never tested

Ensure isValid() will not last more than timeout seconds
even if the underlying socket is broken (issue #1556)
@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 3, 2019

@davecramer

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

Makes sense

@davecramer

This comment has been minimized.

Copy link
Member

commented Sep 3, 2019

@arobert-delfingen can you rebase and push another commit as the .travis.yml file was broken, thanks

@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 4, 2019

@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 4, 2019

@davecramer

This comment has been minimized.

Copy link
Member

commented Sep 4, 2019

@arobert-delfingen so this is now failing most all tests, except for checkstyle ...

@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 5, 2019

@arobert-delfingen

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

Now all tests succeed, but theoritically I should :

  • Surround the 4 calls to get/setNetworkTimeout() by a try/catch (not only the last)
  • Not catch all kinds of SQLException, this is a little bit too wide, but maybe only SQLException having state PSQLState.CONNECTION_DOES_NOT_EXIST (and maybe also PSQLState.COMMUNICATION_ERROR).
    What do you think about that ?
@codecov-io

This comment has been minimized.

Copy link

commented Sep 5, 2019

Codecov Report

Merging #1557 into master will decrease coverage by 0.03%.
The diff coverage is 85.71%.

@@             Coverage Diff              @@
##             master    #1557      +/-   ##
============================================
- Coverage     68.92%   68.88%   -0.04%     
  Complexity     3971     3971              
============================================
  Files           179      179              
  Lines         16545    16569      +24     
  Branches       2695     2695              
============================================
+ Hits          11403    11414      +11     
- Misses         3890     3902      +12     
- Partials       1252     1253       +1
@davecramer

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

@arobert-delfingen yes, to all of the above. Thanks!

@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 5, 2019

@arobert-delfingen

This comment has been minimized.

Copy link
Contributor Author

commented Sep 5, 2019

Any idea why when writen like this it breaks test ? where is my mistake ?

@davecramer

This comment has been minimized.

Copy link
Member

commented Sep 5, 2019

I don't worry too much about Appveyor failures. If it passes Travis I'm good.

@davecramer davecramer merged commit b2eaefe into pgjdbc:master Sep 5, 2019

1 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@AppVeyorBot

This comment has been minimized.

Copy link

commented Sep 5, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.