Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Framework changes and tests for RM queue selection (#571)
* Framework changes and tests for RM queue selection - Added a new class for RM queue selection tests. - Added new methods in ConnectionPool to create connections based on user, password, tags and groups. - Refactored restartDrill out of TestDriver, since it is a utility. - Create connection with schema, group and queryTags properties. - Changes in JavaTestBase to get all Drillbits' hostnames. - Fixed faulty tests in TestSSLProperties * Cosmetic changes. Add comments for the tests. * Add package to manage DrillCluster from SSH - Added classes to manage SSH sessions from a user to a DrillCluster. - Most of the code is re-used from mapr/ycsb-driver implementations. - The DrillCluster instance should be used when the test framework has to talk to the cluster for copying files or running certain commands. - Modified the test cases accordingly. - Added ThrowingConsumer to support lambda for functions with checked exceptions. * Cosmetic changes, add javadoc for new utility methods * Existing TestDriver continue using older method * Small change, missed synchronized * Add a method for cleaning up cluster before every test - Remove any existing RM config in DrillCluster. * Add cleanup after class as well, other cosmetic changes * Minor change, add description to testng methods * Run cleanup once for a class * Cleanup and add test case for unknown tag
- Loading branch information
1 parent
7ea28ba
commit 0c07fc7
Showing
20 changed files
with
1,069 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
framework/src/main/java/org/apache/drill/test/framework/ThrowingConsumer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package org.apache.drill.test.framework; | ||
|
||
import java.util.function.Consumer; | ||
|
||
@FunctionalInterface | ||
public interface ThrowingConsumer<T, E extends Throwable> { | ||
void accept(T t) throws E; | ||
|
||
static <T> Consumer<T> throwingConsumerWrapper( | ||
ThrowingConsumer<T, Exception> throwingConsumer) { | ||
return i -> { | ||
try { | ||
throwingConsumer.accept(i); | ||
} catch (Exception ex) { | ||
Utils.sneakyThrow(ex); | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.