Comments (11)
please add name of driver file to the https://github.com/ObjectivityLtd/DBTestCompare/blob/master/pom.xml#L38,
downloaded drivers copy to the folder /jdbc_drivers
and add new connection to the https://github.com/ObjectivityLtd/DBTestCompare/blob/master/test-definitions/cmpSqlResults-config.xml
from dbtestcompare.
please let me know if it's working ?
from dbtestcompare.
@raczeja thanks for a quick response.
I tried your solution yesterday, but wasn't able to replay you.
I have face another issue. Once I configure Snowflake DB and run test I got something like that:
[INFO ] 2021-01-28 08:19:46,684 RunTests - You can override some of the application configuration properties
Run app with:
-DtestsDir=path - set tests directory (default: test-definitions)
-DteamcityLogsEnabled=true - log test output in TeamCity format
-DfilterInclude=a.b,g.z.f - comma separated directories or test files which you want to include
-DfilterExclude=a.b.test - comma separated directories or test files which you want to exclude
[DEBUG] 2021-01-28 08:19:46,686 RunTests - Scanning tests directory: test-definitions...
[DEBUG] 2021-01-28 08:19:46,687 RunTests - Reading configuration: test-definitions/cmpSqlResults-config.xml
[DEBUG] 2021-01-28 08:19:47,056 RunTests - Number of Threads set in configuration: 5
[DEBUG] 2021-01-28 08:19:47,057 RunTests - Initializing all components ...
[DEBUG] 2021-01-28 08:19:47,059 DataSource - Adding shutdown hook (closing connections)...
[DEBUG] 2021-01-28 08:19:47,059 DataSource - Initializing data source connection pools...
[DEBUG] 2021-01-28 08:19:47,060 DataSource - Max Pool Size:6 for datasource: TERADATA_SERVER
[DEBUG] 2021-01-28 08:19:47,622 DataSource - Max Pool Size:6 for datasource: SNOWFLAKE_SERVER
[DEBUG] 2021-01-28 08:19:47,637 DataSource - Max Pool Size for each DataSource should be >= Threads
[DEBUG] 2021-01-28 08:19:47,640 TestDataProvider - Initializing tests Data Provider...
[DEBUG] 2021-01-28 08:19:47,643 Printer - Initializing logger / printer ...
[DEBUG] 2021-01-28 08:19:47,759 TestDataProvider - Reading tests configuration...
[DEBUG] 2021-01-28 08:19:47,788 TestDataProvider - Running tests...
[INFO ] 2021-01-28 08:19:47,852 DBTestCompare:ae.conifg - Starting test...
[INFO ] 2021-01-28 08:19:49,844 DBTestCompare:ae.conifg - TEST FAILED
java.lang.Exception: java.sql.SQLFeatureNotSupportedException: ResultSet type 1004 is not supported.
Query 1: SELECT distinct GENDER FROM CITIBIKE."PUBLIC".TRIPS
Query 2: SELECT distinct GENDER FROM CITIBIKE."PUBLIC".TRIPS
at uk.co.objectivity.test.db.comparators.FetchComparator.compare(FetchComparator.java:81)
at uk.co.objectivity.test.db.DBTestCompare.testSQLResults(DBTestCompare.java:89)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.TestInvoker.invokeMethod(TestInvoker.java:584)
at org.testng.internal.TestInvoker.invokeTestMethod(TestInvoker.java:172)
at org.testng.internal.MethodRunner.runInSequence(MethodRunner.java:46)
at org.testng.internal.TestInvoker$MethodInvocationAgent.invoke(TestInvoker.java:804)
at org.testng.internal.TestInvoker.invokeTestMethods(TestInvoker.java:145)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:146)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:128)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
I am using FETCH
method to compare results.
Will try to do some research, but maybe you have a solution already.
from dbtestcompare.
Ok, that was quicker than I thought :)
In FetchComparator.java there is a:
connection1.prepareStatement(sql1.getSql(), ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet
.CONCUR_READ_ONLY);
Which use ResultSet.TYPE_FORWARD_ONLY
and according to Snowflake JDBC driver is one of not supported ResultSet types.
Changing this to:
connection1.prepareStatement(sql2.getSql(), ResultSet.TYPE_FORWARD_ONLY, ResultSet
.CONCUR_READ_ONLY);
I was able to run the test.
from dbtestcompare.
you can make PR with your changes, I will merged...
from dbtestcompare.
Well, no problem I can do this, but I am not sure how this influence other databases.
Do you know?
So far I have test it with Teradata and Snowflake and that's working.
from dbtestcompare.
during the build is tested against SQL Server, MySQL and PostgreSQL
https://dev.azure.com/DBTestCompare/Build/_build/results?buildId=170&view=ms.vss-test-web.build-test-results-tab
we will see...
from dbtestcompare.
PR #31 added
from dbtestcompare.
I think that just name of new driver is missing in https://github.com/ObjectivityLtd/DBTestCompare/blob/master/pom.xml#L38
from dbtestcompare.
Yes, sorry about that. Done
from dbtestcompare.
thank you
from dbtestcompare.
Related Issues (20)
- Add Minus Query Indicator for easiest analysis results of Minus\Except query
- Measures of time execution for queries.
- Display statistics of time execution for queries for all tests
- Add StartAtRow attribute for FileComparator to skip n first rows from file
- Add possibility of defining expected values in xml definition of test
- Add 'test set-up' functionality as initial SQL query to prepare test data
- Add 'test clean-up' functionality as final SQL query to clean up the database after performing the test
- Support UNION in MINUS with minusQueryIndicatorOn
- Use UNION ALL in MINUS comparison
- Display number of compared rows in FETCH
- Add Java checkstyle and refactor the code
- Use MINUS ALL in Teradata to get full result set
- Could not load driverClass com.teradata.jdbc.TeraDriver HOT 1
- multi threads execution vs connection pool - add to logs information about set values
- Add unit tests
- Parameterizing the datasource by app itself (replace tokens) - consider the solution - now can be done bu using ANT
- Parameterizing the sqls in test definition by app itself (replace tokens) - consider the solution - now can be done bu using ANT
- JDBC connection HOT 2
- Missing executed query when there is e.g. SQL exception
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dbtestcompare.