Description
When org.apache.spark.sql.hive.thriftserver.HiveThriftServer2#startWithContext called,
it starts ThriftCLIService in the background with a new Thread, at the same time we call ThriftCLIService.getPortNumber, we might not get the bound port if it's configured with 0.