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
Use loopback network interface for testcases. #1097
Conversation
- tests would be more reliable irrespective of the environment, if the loopback address is used in testsuites. - unless loopback address is set explicitly, in my env (while on company's VPN), UpdateCookieCmdTest is failing most of the times. - currently allowLoopback is set to true in BookKeeperClusterTestCase, it doesn't make Bookies to use loopback interface address. - loopback network interface should be set explicitly as listening interface to use loopback address.
43ae8a4
to
c25ebe1
Compare
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1. lgtm.
Would you please help check whether the failed test cases is related to this ?
retest this please |
I ran locally AuditorLedgerCheckerTest and BookieClientTest multiple times and they are running fine. Not sure why tests failed here. Also different tests failed in Java8 and Java9 build. |
@sijie I made changes to the initial commit and replaced the initial commit. Can you sign-off on this. Thanks. |
@reddycharan I don't think the failures are related. |
*Problem* Issue apache#1097 introduced using `loopback` nic as the bookie server identifier. However a few test cases construct the bookie socket address using `InetAddress.getLocalHost()` and the bookie port. This bookie socket address can be different from the actual socket address that a bookie is advertising to zookeeper. It will cause test cases fail with some network settings. *Solution* This change use `BookieServer#getLocalAddress()` to retrieve the actual bookie socket address. so it would respect to the server configuration and use the right socket address in the test.
Descriptions of the changes in this PR: *Problem* Issue #1097 introduced using `loopback` nic as the bookie server identifier. However a few test cases construct the bookie socket address using `InetAddress.getLocalHost()` and the bookie port. This bookie socket address can be different from the actual socket address that a bookie is advertising to zookeeper. It will cause test cases fail with certain network settings. *Solution* This change use `BookieServer#getLocalAddress()` to retrieve the actual bookie socket address. so it would respect to the server configuration and use the right socket address in the test. Author: Sijie Guo <sijie@apache.org> Reviewers: Charan Reddy Guttapalem <reddycharan18@gmail.com>, Enrico Olivelli <eolivelli@gmail.com> This closes #1172 from sijie/use_bookie_server_get_local_address
Descriptions of the changes in this PR: *Problem* in GSSAPIBookKeeperTest, `InetAddress.getLocalHost().getHostName()` was used for adding principle to kdc keytab. However in the tests, it uses advertisedAddress (introduced by #1097). So it causes authentication failed because server can't be found. *Solution* Change to use `Bookie. getBookieAddress(..)` to get the real hostname used by bookie for adding keytab entries. Author: Sijie Guo <sijie@apache.org> Reviewers: Charan Reddy Guttapalem <reddycharan18@gmail.com>, Enrico Olivelli <eolivelli@gmail.com> This closes #1191 from sijie/fix_gssapibookkeeper_test
Descriptions of the changes in this PR:
UpdateCookieCmdTest is failing most of the times.
but it doesn't make Bookies to use loopback interface address.
listening interface to use loopback address.
Note: