[ 
https://issues.apache.org/jira/browse/NIFI-3107?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865092#comment-15865092
 ] 

ASF GitHub Bot commented on NIFI-3107:
--------------------------------------

GitHub user ijokarumawak opened a pull request:

    https://github.com/apache/nifi/pull/1504

    NIFI-3107: Unit test failure for DBCPServiceTest

    H2 and Kafka broker uses the same default port 9092.
    If an user is running Kafka broker on the same machine, or run the unit
    tests in parallel, DBCPServiceTest can fail since some of its test
    methods connects to port 9092.
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number 
you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target 
branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [ ] Have you ensured that the full suite of tests is executed via mvn 
-Pcontrib-check clean install at the root nifi folder?
    - [x] Have you written or updated unit tests to verify your changes?
    - [ ] If adding new dependencies to the code, are these dependencies 
licensed in a way that is compatible for inclusion under [ASF 
2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main 
LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main 
NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to 
.name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in 
which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build 
issues and submit an update to your PR as soon as possible.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ijokarumawak/nifi nifi-3107

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1504.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1504
    
----
commit a819b88bc147127a412e6a1ca85d1c4fc679b53f
Author: Koji Kawamura <[email protected]>
Date:   2017-02-14T05:29:02Z

    NIFI-3107: Unit test failure for DBCPServiceTest
    
    H2 and Kafka broker uses the same default port 9092.
    If an user is running Kafka broker on the same machine, or run the unit
    tests in parallel, DBCPServiceTest can fail since some of its test
    methods connects to port 9092.

----


> Unit test failure for DBCPServiceTest
> -------------------------------------
>
>                 Key: NIFI-3107
>                 URL: https://issues.apache.org/jira/browse/NIFI-3107
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>         Environment: OSX Yosemite
> Apache Maven 3.3.3
> Java version: 1.8.0_60, vendor: Oracle Corporation
>            Reporter: Mark Payne
>             Fix For: 1.2.0
>
>
> When I attempt to build the DBCPService module, I see a failure with the 
> following output:
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.nifi.dbcp.DBCPServiceTest
> Tests run: 11, Failures: 0, Errors: 2, Skipped: 4, Time elapsed: 1.492 sec 
> <<< FAILURE! - in org.apache.nifi.dbcp.DBCPServiceTest
> testDropInvalidConnectionsH2_Default(org.apache.nifi.dbcp.DBCPServiceTest)  
> Time elapsed: 0.141 sec  <<< ERROR!
> org.apache.nifi.processor.exception.ProcessException: 
> org.apache.commons.dbcp.SQLNestedException: Cannot create 
> PoolableConnectionFactory (Connection is broken: "java.io.EOFException: 
> localhost" [90067-192])
>       at java.io.DataInputStream.readInt(DataInputStream.java:392)
>       at org.h2.value.Transfer.readInt(Transfer.java:153)
>       at org.h2.engine.SessionRemote.done(SessionRemote.java:617)
>       at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:133)
>       at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:448)
>       at 
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:329)
>       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:118)
>       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:102)
>       at org.h2.Driver.connect(Driver.java:72)
>       at 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>       at 
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>       at 
> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
>       at 
> org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
>       at 
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
>       at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
>       at 
> org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:249)
>       at 
> org.apache.nifi.dbcp.DBCPServiceTest.testDropInvalidConnectionsH2_Default(DBCPServiceTest.java:200)
> testDropInvalidConnectionsH2_Better(org.apache.nifi.dbcp.DBCPServiceTest)  
> Time elapsed: 0.008 sec  <<< ERROR!
> org.apache.nifi.processor.exception.ProcessException: 
> org.apache.commons.dbcp.SQLNestedException: Cannot create 
> PoolableConnectionFactory (Connection is broken: "java.io.EOFException: 
> localhost" [90067-192])
>       at java.io.DataInputStream.readInt(DataInputStream.java:392)
>       at org.h2.value.Transfer.readInt(Transfer.java:153)
>       at org.h2.engine.SessionRemote.done(SessionRemote.java:617)
>       at org.h2.engine.SessionRemote.initTransfer(SessionRemote.java:133)
>       at org.h2.engine.SessionRemote.connectServer(SessionRemote.java:448)
>       at 
> org.h2.engine.SessionRemote.connectEmbeddedOrServer(SessionRemote.java:329)
>       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:118)
>       at org.h2.jdbc.JdbcConnection.<init>(JdbcConnection.java:102)
>       at org.h2.Driver.connect(Driver.java:72)
>       at 
> org.apache.commons.dbcp.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:38)
>       at 
> org.apache.commons.dbcp.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:582)
>       at 
> org.apache.commons.dbcp.BasicDataSource.validateConnectionFactory(BasicDataSource.java:1556)
>       at 
> org.apache.commons.dbcp.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:1545)
>       at 
> org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1388)
>       at 
> org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:1044)
>       at 
> org.apache.nifi.dbcp.DBCPConnectionPool.getConnection(DBCPConnectionPool.java:249)
>       at 
> org.apache.nifi.dbcp.DBCPServiceTest.testDropInvalidConnectionsH2_Better(DBCPServiceTest.java:252)
> Results :
> Tests in error:
>   DBCPServiceTest.testDropInvalidConnectionsH2_Better:252 » Process 
> org.apache.c...
>   DBCPServiceTest.testDropInvalidConnectionsH2_Default:200 » Process 
> org.apache....
> Tests run: 11, Failures: 0, Errors: 2, Skipped: 4
> I've tried running "mvn clean install" several times, always with these 
> failures. Sometimes I see only 1 of them, sometimes both of them.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to