/** * Close the current <i>client</i> and open a new client using the given <i>properties</i>. All tests executed * after this method call use the new <i>client</i>. * * @param properties */ public static void updateClient(Properties properties) throws Exception { Preconditions.checkState(nodes != null && nodes[0] != null, "Nodes are not setup."); if (client != null) { client.close(); client = null; } client = QueryTestUtil.createClient(config, clusterCoordinator, MAX_WIDTH_PER_NODE, properties); }
@BeforeClass public static void openClient() throws Exception { config = SabotConfig.create(TEST_CONFIGURATIONS); clusterCoordinator = LocalClusterCoordinator.newRunningCoordinator(); bit = new SabotNode(config, clusterCoordinator, DremioTest.CLASSPATH_SCAN_RESULT, true); bit.run(); client = QueryTestUtil.createClient(config, clusterCoordinator, 2, null); }
private static void openClient() throws Exception { clusterCoordinator = LocalClusterCoordinator.newRunningCoordinator(); dfsTestTmpSchemaLocation = TestUtilities.createTempDir(); nodes = new SabotNode[nodeCount]; for(int i = 0; i < nodeCount; i++) { // first node has all roles, and all others are only executors nodes[i] = SABOT_NODE_RULE.newSabotNode(new SabotProviderConfig(i == 0)); BINDER_RULE.updateBindingCreator(nodes[i].getBindingCreator()); nodes[i].run(); if(i == 0) { TestUtilities.addDefaultTestPlugins(nodes[i].getContext().getCatalogService(), dfsTestTmpSchemaLocation); } } client = QueryTestUtil.createClient(config, clusterCoordinator, MAX_WIDTH_PER_NODE, defaultProperties); // turn off re-attempts, this needs to be set at the system level as many unit test will // reset the user session by restarting the client setEnableReAttempts(false); }