* @return
* @throws Exception
*/
protected final Client createClient() throws Exception {
// Connect to random site and using a random port that it's listening on
Site catalog_site = CollectionUtil.random(catalogContext.sites);
assertNotNull(catalog_site);
Host catalog_host = catalog_site.getHost();
assertNotNull(catalog_host);
String hostName = catalog_host.getIpaddr();
int port = catalog_site.getProc_port();
LOG.debug(String.format("Creating new client connection to HStoreSite %s at %s:%d",
HStoreThreadManager.formatSiteName(catalog_site.getId()),
hostName, port));
Client client = ClientFactory.createClient(128, null, false, null);
client.createConnection(null, hostName, port, "user", "password");
return (client);