forked from apache/druid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable resultset validation of Drill tests (apache#15096)
- introduces a test_X method for every testcase (995 testcases) - added a resultset parser which reads the expected resultset based on the result schema - loaded a few more datasets - added a testcase to ensure that all files have a corresponding testcase - renamed DecoupledIgnore to NegativeTest - categorized the failing 268 tests
- Loading branch information
1 parent
97a70df
commit 1af0a5a
Showing
7 changed files
with
7,978 additions
and
140 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
55 changes: 55 additions & 0 deletions
55
sql/src/test/java/org/apache/druid/sql/calcite/DisableUnless.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,55 @@ | ||
/* | ||
* Licensed to the Apache Software Foundation (ASF) under one | ||
* or more contributor license agreements. See the NOTICE file | ||
* distributed with this work for additional information | ||
* regarding copyright ownership. The ASF licenses this file | ||
* to you under the Apache License, Version 2.0 (the | ||
* "License"); you may not use this file except in compliance | ||
* with the License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.apache.druid.sql.calcite; | ||
|
||
import com.google.common.base.Supplier; | ||
import org.apache.druid.common.config.NullHandling; | ||
import org.junit.rules.TestRule; | ||
import org.junit.runner.Description; | ||
import org.junit.runners.model.Statement; | ||
|
||
import static org.junit.Assume.assumeTrue; | ||
|
||
/** | ||
* Collection of conditional disabler rules. | ||
*/ | ||
class DisableUnless | ||
{ | ||
public static final TestRule SQL_COMPATIBLE = new DisableUnlessRule("NullHandling::sqlCompatible", NullHandling::sqlCompatible); | ||
|
||
public static class DisableUnlessRule implements TestRule | ||
{ | ||
private Supplier<Boolean> predicate; | ||
private String message; | ||
|
||
public DisableUnlessRule(String message, Supplier<Boolean> predicate) | ||
{ | ||
this.message = message; | ||
this.predicate = predicate; | ||
} | ||
|
||
@Override | ||
public Statement apply(Statement base, Description description) | ||
{ | ||
assumeTrue("Testcase disabled; because condition not met: " + message, predicate.get()); | ||
return base; | ||
} | ||
} | ||
} |
Oops, something went wrong.