-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Use quidem to run tests #16249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Use quidem to run tests #16249
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
ac6c677
Quidem test runner
kgyrtkirk 6f547e1
updates
kgyrtkirk 9db1aee
update
kgyrtkirk 3bc928e
missed update
kgyrtkirk b637d53
disable quidem tests in sqlcompatible=false
kgyrtkirk f840e9f
make join opts named
kgyrtkirk b0a9991
some stuff
kgyrtkirk 8b46032
add iq for join stuff
kgyrtkirk 38471a6
undo not needed change
kgyrtkirk d5bf196
remove&undo quidem run in decoupledextension for now
kgyrtkirk 136e79d
checkstyle
kgyrtkirk ddc26e9
followup
kgyrtkirk ec54b5b
cleanup
kgyrtkirk 659ced9
remove urnelated
kgyrtkirk f55f3e4
remove incorrect assume
kgyrtkirk a13051e
followup remove class
kgyrtkirk 494f105
add afterall-close
kgyrtkirk 73111ab
Revert "Revert "close AvaticaJettyServer""
kgyrtkirk 49693ee
close
kgyrtkirk cfaa99b
add close to BaseCalciteQueryTest
kgyrtkirk 7b3ac58
use default impl instead of empty methods
kgyrtkirk d61b9a0
add missing override
kgyrtkirk bf524c7
add runnable
kgyrtkirk 4d750b9
Merge branch 'm' into quidem-runner
kgyrtkirk b09aa1a
fix merge issues
kgyrtkirk 8f17865
Merge remote-tracking branch 'apache/master' into quidem-runner
kgyrtkirk File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -47,3 +47,4 @@ website/i18n/* | |
| nbproject | ||
| nbactions.xml | ||
| nb-configuration.xml | ||
| *.iq.out | ||
This file contains hidden or 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
2 changes: 2 additions & 0 deletions
2
benchmarks/src/test/resources/META-INF/services/java.sql.Driver
This file contains hidden or 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,2 @@ | ||
| org.apache.druid.quidem.DruidAvaticaTestDriver | ||
| org.apache.calcite.avatica.remote.Driver |
This file contains hidden or 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 hidden or 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,46 @@ | ||
| #!/bin/bash | ||
|
|
||
| # 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. | ||
| #-------------------------------------------------------------------- | ||
|
|
||
| # Utility script for running the new integration tests, since the Maven | ||
| # commands are unwieldy. Allows straightforward usage of ITs on the desktop | ||
| # and in various build scripts. Handles configuration of various kinds. | ||
|
|
||
|
|
||
| set -e | ||
|
|
||
| OPTS+=" -Pskip-static-checks" | ||
| OPTS+=" -Dsurefire.rerunFailingTestsCount=0" | ||
| OPTS+=" -Dorg.slf4j.simpleLogger.log.org.apache.maven.plugin.surefire.SurefirePlugin=INFO" | ||
| [[ $@ =~ "-q" ]] && OPTS+=" -Dsurefire.trimStackTrace=true" | ||
|
|
||
| OPTS+=" -pl sql -Dtest=SqlQuidemTest" | ||
| OPTS+=" org.apache.maven.plugins:maven-surefire-plugin:test" | ||
|
|
||
| case "$1" in | ||
| -h|--help) | ||
| cat << EOF | ||
| Run SqlQuidemTest tests. | ||
| -q quiet (recommened) | ||
| -Dquidem.overwrite enables overwrite mode | ||
| -Dquidem.filter=*join* runs only tests matching path expression | ||
| EOF | ||
| exit 1 | ||
| ;; | ||
| esac | ||
|
|
||
| exec mvn "$@" $OPTS |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
56 changes: 56 additions & 0 deletions
56
sql/src/test/java/org/apache/druid/quidem/DruidAvaticaDriverTest.java
This file contains hidden or 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,56 @@ | ||
| /* | ||
| * 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.quidem; | ||
|
|
||
| import org.junit.jupiter.api.Test; | ||
|
|
||
| import java.sql.Connection; | ||
| import java.sql.DriverManager; | ||
| import java.sql.ResultSet; | ||
| import java.sql.SQLException; | ||
| import java.sql.Statement; | ||
|
|
||
| import static org.junit.Assert.assertFalse; | ||
| import static org.junit.Assert.assertTrue; | ||
| import static org.junit.jupiter.api.Assertions.assertEquals; | ||
|
|
||
| public class DruidAvaticaDriverTest | ||
| { | ||
| // create a new driver instance; this will load the class and register it | ||
| DruidAvaticaTestDriver driver = new DruidAvaticaTestDriver(); | ||
|
|
||
| @Test | ||
| public void testSelect() throws SQLException | ||
| { | ||
| try (Connection con = DriverManager.getConnection("druidtest:///"); | ||
| Statement stmt = con.createStatement(); | ||
| ResultSet rs = stmt.executeQuery("select 42");) { | ||
| assertTrue(rs.next()); | ||
| assertEquals(42, rs.getInt(1)); | ||
| assertFalse(rs.next()); | ||
| } | ||
| } | ||
|
|
||
| @Test | ||
| public void testURIParse() throws SQLException | ||
| { | ||
| DruidAvaticaTestDriver.buildConfigfromURIParams("druidtest:///"); | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.