Skip to content

Commit

Permalink
updating tooling and libs versions; removing coveralls (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
typekpb committed Oct 2, 2018
1 parent 9135c94 commit d744fae
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 76 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,6 @@ _build/

# zsh gradle plugin
.gradletasknamecache

# vscode
.vscode
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,7 @@ after_success:
# oraclejdk 8 used for all the publishing works
if [[ $TRAVIS_JDK_VERSION == "oraclejdk8" ]]; then
# coveralls publishing
if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PULL_REQUEST == "false" ]]; then
./gradlew jacocoTestReport coveralls --info --stacktrace
fi
# sonarcloud.io publishing
# by default, the SonarCloud add-on only analyzes the master branch, see https://docs.travis-ci.com/user/sonarcloud/
./gradlew sonarqube --info --stacktrace
# github release notes sync (via chandler)
Expand Down
3 changes: 0 additions & 3 deletions .vscode/settings.json

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ p6spy
[![Bintray](https://api.bintray.com/packages/p6spy/maven/p6spy%3Ap6spy/images/download.svg) ](https://bintray.com/p6spy/maven/p6spy%3Ap6spy/_latestVersion)
[![Docs](http://readthedocs.org/projects/p6spy/badge/?version=latest)](http://p6spy.readthedocs.io/)
[![Javadoc](http://www.javadoc.io/badge/p6spy/p6spy.svg)](http://www.javadoc.io/doc/p6spy/p6spy)
[![Coverage Status](https://coveralls.io/repos/github/p6spy/p6spy/badge.svg?branch=master)](https://coveralls.io/github/p6spy/p6spy?branch=master)
[![Sonarcloud Status](https://sonarcloud.io/api/project_badges/measure?project=p6spy:p6spy&metric=alert_status)](https://sonarcloud.io/dashboard?id=p6spy:p6spy)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=p6spy:p6spy&metric=coverage)](https://sonarcloud.io/dashboard?id=p6spy:p6spy)
[![Quality Gate](https://sonarcloud.io/api/badges/gate?key=p6spy%3Ap6spy)](https://sonarcloud.io/dashboard?id=p6spy%3p6spy)

P6Spy is a framework that enables database data to be seamlessly intercepted and logged with no code changes to existing application. The P6Spy distribution includes P6Log, an application which logs all JDBC transactions for any Java application.

Expand Down
80 changes: 45 additions & 35 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ plugins {
id 'maven-publish'
id 'distribution'

id 'com.fizzpod.sweeney' version '2.1.2'
id 'com.fizzpod.sweeney' version '3.0.0'
id 'com.github.hierynomus.license' version '0.14.0'
id 'com.github.johnrengelman.shadow' version '2.0.1'
// to publish code coverage to coveralls
// ./gradlew jacocoTestReport coveralls
id 'com.github.kt3k.coveralls' version '2.8.1'
id 'com.github.johnrengelman.shadow' version '4.0.1'
// to publish !SNAPSHOTs to bintray
// ./gradlew bintrayUpload
id 'com.jfrog.bintray' version '1.7.3'
id 'com.jfrog.bintray' version '1.8.4'
// to publish SNAPSHOTs to oss.jfrog.org
// ./gradlew artifactoryPublish
id 'com.jfrog.artifactory' version '4.5.2'
id 'com.jfrog.artifactory' version '4.7.5'
id "com.github.ben-manes.versions" version "0.20.0"
id "org.sonarqube" version "2.6.2"
}

Expand Down Expand Up @@ -60,46 +58,46 @@ dependencies {
// for providing misc *-nodep artifacts, please note that order matters here
// even if slf4j complains about multiple implementations on classpath, it takes the 1.st one
// and as we use log4j in tests => bridge needs to be the 1.st one specified
compileOnly 'org.slf4j:slf4j-api:1.7.7'
compileOnly 'org.slf4j:slf4j-log4j12:1.7.7'
compileOnly 'org.slf4j:slf4j-api:1.7.25'
compileOnly 'org.slf4j:slf4j-log4j12:1.7.25'
compileOnly 'log4j:log4j:1.2.17'
testCompile 'org.slf4j:slf4j-api:1.7.7'
testCompile 'org.slf4j:slf4j-log4j12:1.7.7'
testCompile 'org.slf4j:slf4j-api:1.7.25'
testCompile 'org.slf4j:slf4j-log4j12:1.7.25'
testCompile 'log4j:log4j:1.2.17'

compileOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.0-rc1'
compileOnly 'org.apache.logging.log4j:log4j-api:2.0-rc1'
compileOnly 'org.apache.logging.log4j:log4j-core:2.0-rc1'
compileOnly 'org.apache.logging.log4j:log4j-slf4j-impl:2.11.1'
compileOnly 'org.apache.logging.log4j:log4j-api:2.11.1'
compileOnly 'org.apache.logging.log4j:log4j-core:2.11.1'

compileOnly 'ch.qos.logback:logback-classic:1.1.2'
compileOnly 'ch.qos.logback:logback-core:1.1.2'
compileOnly 'ch.qos.logback:logback-classic:1.2.3'
compileOnly 'ch.qos.logback:logback-core:1.2.3'

testCompile 'junit:junit:4.12'
testCompile 'org.eclipse.jetty:jetty-plus:8.1.7.v20120910' // datasource testing through JNDI
testCompile 'org.eclipse.jetty:jetty-plus:9.4.12.v20180830' // datasource testing through JNDI
testCompile 'commons-dbcp:commons-dbcp:1.4' // datasource testing
testCompile 'org.codehaus.btm:btm:2.1.4' // xa datasource testing
testCompile 'org.apache.geronimo.specs:geronimo-jta_1.1_spec:1.1.1'
testCompile 'org.liquibase:liquibase-core:3.0.8'
testCompile 'com.mattbertolini:liquibase-slf4j:1.2.1'
testCompile 'org.springframework:spring-jdbc:3.2.4.RELEASE'
testCompile 'org.springframework:spring-context:3.2.4.RELEASE'
testCompile 'com.j256.simplejmx:simplejmx:1.1'
testCompile 'commons-io:commons-io:2.4'
testCompile 'org.apache.commons:commons-exec:1.2'
testCompile 'org.apache.commons:commons-lang3:3.3.2'
testCompile 'commons-beanutils:commons-beanutils:1.9.1'
testCompile 'org.mockito:mockito-core:2.7.22'
testCompile 'org.apache.tomcat:tomcat-jdbc:8.5.6' // tomcat pooled datasource testing
testCompile 'org.springframework:spring-jdbc:5.1.0.RELEASE'
testCompile 'org.springframework:spring-context:5.1.0.RELEASE'
testCompile 'com.j256.simplejmx:simplejmx:1.15'
testCompile 'commons-io:commons-io:2.6'
testCompile 'org.apache.commons:commons-exec:1.3'
testCompile 'org.apache.commons:commons-lang3:3.8.1'
testCompile 'commons-beanutils:commons-beanutils:1.9.3'
testCompile 'org.mockito:mockito-core:2.22.0'
testCompile 'org.apache.tomcat:tomcat-jdbc:9.0.12' // tomcat pooled datasource testing

// all the JDBC drivers tested
testRuntime 'mysql:mysql-connector-java:5.1.21'
testRuntime 'org.postgresql:postgresql:9.3-1100-jdbc41'
testCompile 'org.hsqldb:hsqldb:2.3.1'
testCompile 'com.h2database:h2:1.4.196'
testRuntime 'org.xerial:sqlite-jdbc:3.7.2' // type 3 driver
testRuntime 'org.apache.derby:derby:10.10.1.1'
testRuntime 'org.firebirdsql.jdbc:jaybird-jdk17:2.2.3' // type 4.1 driver
testRuntime 'com.microsoft.sqlserver:mssql-jdbc:6.1.0.jre7'
testRuntime 'mysql:mysql-connector-java:5.1.47'
testRuntime 'org.postgresql:postgresql:42.2.5.jre7'
testCompile 'org.hsqldb:hsqldb:2.4.1'
testCompile 'com.h2database:h2:1.4.197'
testRuntime 'org.xerial:sqlite-jdbc:3.25.2' // type 3 driver
testRuntime 'org.apache.derby:derby:10.14.2.0'
testRuntime 'org.firebirdsql.jdbc:jaybird-jdk17:3.0.5' // type 4.1 driver
testRuntime 'com.microsoft.sqlserver:mssql-jdbc:7.1.1.jre8-preview'

if (envDB.contains('Oracle')) {
testRuntime name: 'ojdbc6' // oracle copied from docker oracle container
Expand All @@ -113,7 +111,6 @@ sweeney {

jacocoTestReport {
reports {
xml.enabled = true // coveralls plugin depends on xml format report
html.enabled = true
}
}
Expand Down Expand Up @@ -356,6 +353,19 @@ bintray {
}
}

dependencyUpdates.resolutionStrategy {
componentSelection { rules ->
rules.all { ComponentSelection selection ->
boolean rejected = ['alpha', 'beta', 'rc', 'cr', 'm', 'preview'].any { qualifier ->
selection.candidate.version ==~ /(?i).*[.-]${qualifier}[.\d-]*/
}
if (rejected) {
selection.reject('Release candidate')
}
}
}
}

task wrapper(type: Wrapper, description: 'Gradle Wrapper task') {
gradleVersion = '4.4'
}
21 changes: 0 additions & 21 deletions src/test/java/com/p6spy/engine/spy/P6TestCallableStatement.java
Original file line number Diff line number Diff line change
Expand Up @@ -145,13 +145,6 @@ public void testNamedParameters() throws SQLException {
String param2Name = "param2";
String resultParamName = "result_param";

if( "HSQLDB".equals(db) ) {
// HSQLDB uses @p1, @p2, etc... as the "names" of the parameters
param1Name = "@p1";
param2Name = "@p2";
resultParamName = "@p3";
}

// execute the statement
String query = "{call test_proc(?,?,?)}";
CallableStatement call = connection.prepareCall(query);
Expand Down Expand Up @@ -199,13 +192,6 @@ public void binaryExcludedTrue() throws SQLException {
String paramValName = "param_val";
String paramIntName = "param_id";
String resultParamName = "result_param";

if( "HSQLDB".equals(db) ) {
// HSQLDB uses @p1, @p2, etc... as the "names" of the parameters
paramValName = "@p1";
paramIntName = "@p2";
resultParamName = "@p3";
}

// execute the statement
String query = "{call test_proc_binary(?,?,?)}";
Expand Down Expand Up @@ -233,13 +219,6 @@ public void binaryExcludedFalse() throws SQLException {
String paramValName = "param_val";
String paramIntName = "param_id";
String resultParamName = "result_param";

if( "HSQLDB".equals(db) ) {
// HSQLDB uses @p1, @p2, etc... as the "names" of the parameters
paramValName = "@p1";
paramIntName = "@p2";
resultParamName = "@p3";
}

// execute the statement
String query = "{call test_proc_binary(?,?,?)}";
Expand Down
3 changes: 2 additions & 1 deletion src/test/java/com/p6spy/engine/spy/P6TestCommon.java
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,8 @@ private void testResultAndResultSetCategory(final boolean resultCategoryNotExclu

while (resultSet.next()) {
String col1 = resultSet.getString("name");
assertTrue(col1.startsWith("david") || col1.startsWith("mary"));
System.out.println("col1" + col1);
assertTrue("david".equals(col1) || "mary".equals(col1));
}
int resultCount = 0;
int resultSetCount = 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void testCallingSetMethodsOnStatementInterface() throws SQLException {

prep.setQueryTimeout(12);
// The SQLLite driver returns the value in ms
assertEquals(("SQLite".equals(db) ? 12000 : 12), prep.getQueryTimeout());
assertEquals(("SQLite".equals(db) ? 3000 : 12), prep.getQueryTimeout());

prep.close();
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
com.p6spy.engine.test.TestJdbcEventListener
does.not.Exist
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
does.not.Exist
com.p6spy.engine.test.TestLoggingEventListener
19 changes: 18 additions & 1 deletion src/test/resources/liquibase.xml
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,24 @@
</createProcedure>
</changeSet>

<changeSet id="create-img-table" author="butkovic">
<changeSet id="create-img-table-postgres" author="butkovic">
<preConditions onFail="CONTINUE">
<dbms type="postgresql"/>
</preConditions>
<!-- table holding binary data -->
<createTable tableName="img">
<column name="id" type="int"/>
<column name="val" type="bytea"/>
<column name="val2" type="bytea"/>
</createTable>
</changeSet>

<changeSet id="create-img-table-non-postgres" author="butkovic">
<preConditions onFail="CONTINUE">
<not>
<dbms type="postgresql"/>
</not>
</preConditions>
<!-- table holding binary data -->
<createTable tableName="img">
<column name="id" type="int"/>
Expand Down
8 changes: 4 additions & 4 deletions src/test/resources/testdata/customers.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
id,name
1,'david'
2,'mary'
3,'sam'
4,'tina'
1,david
2,mary
3,sam
4,tina

0 comments on commit d744fae

Please sign in to comment.