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
HIVE-28194: Regenerate HS2 thrift port in TestRetryingThriftCLIServiceClient #5205
base: master
Are you sure you want to change the base?
Conversation
server.start(); | ||
Thread.sleep(5000); | ||
System.out.println("## HiveServer started"); | ||
private void startHiveServer() throws Exception { |
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.
that looks similar to TestHS2HttpServer#beforeTests
, would be nice to extract common code into a base class and return the port
HS2 was started on
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.
@deniskuzZ I have made a few changes please have a look!
|
||
@Before | ||
public void init() { | ||
hiveConf = new HiveConf(); | ||
hiveConf.setVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_BIND_HOST, "localhost"); | ||
hiveConf.setIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT, 15000); | ||
hiveConf.setIntVar(HiveConf.ConfVars.HIVE_SERVER2_THRIFT_PORT, port); |
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.
what's the use of it, since HS2 start is done later and free port could be different?
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.
Makes sense, reverted it back to 15000
Quality Gate passedIssues Measures |
What changes were proposed in this pull request?
Hive thrift port was hardcoded to 15000, hence port regeneration code was added here
Why are the changes needed?
Testcase can fail if the port is occupied by another test in testsplit pipeline
Does this PR introduce any user-facing change?
No
Is the change a dependency upgrade?
No
How was this patch tested?
Local machine