rymarm commented on pull request #2333: URL: https://github.com/apache/drill/pull/2333#issuecomment-948429459
@luocooong could you, please, review my fix? Now it passes all verifications. I've found the root cause why the test was failing - the reason was that in my previous revision, method `DrillConnectionImpl#isValid` could close a connection if `DrillClient#ping` return `false` (what means, that connection is not valid, drillbit doesn't answer), and the test was written so, that every method of `Connection` is tested on the same connection, and if some of the methods close connection all farther methods will get a closed connection. As the test uses "dummy values" to invoke methods, `DrillClient#ping` is invoked with 0 timeout, which leads to unpredictable situations, when on some machines `DrillClient#ping` returns `false`, because the timeout is 0 and the method checks whether PONG answer was received without a wait. I've revised my fix and decided, that `DrillConnectionImpl#isValid` shouldn't close a connection, even if it was found, that the connection is not valid - a method should do only one thing and only what is expected from it. -- 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. To unsubscribe, e-mail: dev-unsubscr...@drill.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org