You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2022/07/12 04:37:26 UTC
[GitHub] [drill] jnturton opened a new pull request, #2592: DRILL-8256: Fix unit tests of Kerberos auth in RPC
jnturton opened a new pull request, #2592:
URL: https://github.com/apache/drill/pull/2592
# [DRILL-8256](https://issues.apache.org/jira/browse/DRILL-8256): Fix unit tests of Kerberos auth in RPC
## Description
Minor bugs in some unit tests in org.apache.drill.exec.rpc.user.security have meant that they have been disabled historically to prevent causing CI failures.
## Documentation
N/A.
## Testing
Fixed unit tests will run in CI.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [drill] jnturton commented on a diff in pull request #2592: DRILL-8256: Fix unit tests of Kerberos auth in RPC
Posted by GitBox <gi...@apache.org>.
jnturton commented on code in PR #2592:
URL: https://github.com/apache/drill/pull/2592#discussion_r920142742
##########
exec/java-exec/src/test/java/org/apache/drill/test/QueryBuilder.java:
##########
@@ -281,19 +281,31 @@ public QueryBuilder physical(String plan) {
}
/**
- * Run a query contained in a resource file.
+ * Parse a single SQL statement (with optional ending semi-colon) from
+ * the resource provided.
*
- * @param resource Name of the resource
+ * @param resource the resource containing exactly one SQL statement, with
+ * optional ending semi-colon
* @return this builder
*/
- public QueryBuilder sqlResource(String resource) {
- sql(ClusterFixture.loadResource(resource));
- return this;
+ public QueryBuilder sqlResource(String resource) throws IOException {
+ String script = ClusterFixture.loadResource(resource);
+ StatementParser parser = new StatementParser(script);
+ String sql = parser.parseNext();
+ if (sql == null) {
+ throw new IllegalArgumentException("No query found");
+ }
+ return sql(sql);
}
- public QueryBuilder sqlResource(String resource, Object... args) {
- sql(ClusterFixture.loadResource(resource), args);
- return this;
+ public QueryBuilder sqlResource(String resource, Object... args) throws IOException {
+ String script = ClusterFixture.loadResource(resource);
+ StatementParser parser = new StatementParser(script);
+ String sql = parser.parseNext();
+ if (sql == null) {
+ throw new IllegalArgumentException("No query found");
+ }
+ return sql(sql);
Review Comment:
```suggestion
return sql(sql, args);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [drill] jnturton merged pull request #2592: DRILL-8256: Fix unit tests of Kerberos auth in RPC
Posted by GitBox <gi...@apache.org>.
jnturton merged PR #2592:
URL: https://github.com/apache/drill/pull/2592
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [drill] jnturton commented on pull request #2592: DRILL-8256: Fix unit tests of Kerberos auth in RPC
Posted by GitBox <gi...@apache.org>.
jnturton commented on PR #2592:
URL: https://github.com/apache/drill/pull/2592#issuecomment-1181372678
Weird, the TestBitBitKerberos class isn't being run even though I've removed the @Ignore from it. Yet there's another class in the same package called TestBitRpc which _is_ run. @vdiravka, any idea why this is happening? Is it because I converted TestBitBitKerberos to a ClusterTest?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@drill.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org