You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Weston M. Price (Created) (JIRA)" <ji...@apache.org> on 2012/01/11 23:01:40 UTC

[jira] [Created] (QPID-3751) Add Unit/System Testing to JCA Component

Add Unit/System Testing to JCA Component
----------------------------------------

                 Key: QPID-3751
                 URL: https://issues.apache.org/jira/browse/QPID-3751
             Project: Qpid
          Issue Type: Improvement
          Components: JCA
         Environment: All OS platforms, all JEE supported platforms.
            Reporter: Weston M. Price
            Assignee: Weston M. Price
         Attachments: jca-testing.patch

Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 

I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price resolved QPID-3751.
-----------------------------------

    Resolution: Fixed

Fixed in trunk with provided patch.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188834#comment-13188834 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/
-----------------------------------------------------------

Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.


Summary
-------

The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.

Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 

While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 

To get things started I have added two tests classes:

qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java

This is a system test class with two tests that test the following JIRA's

https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().

Results:
[junit] Running org.apache.qpid.ra.QpidRAConnectionTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec


qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java

This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.

Results:
 [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
 [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
 

Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.


This addresses bug QPID-3751.
    https://issues.apache.org/jira/browse/QPID-3751


Diffs
-----

  /trunk/qpid/java/jca/example/.gitignore 1233097 
  /trunk/qpid/java/systests/build.xml 1233097 
  /trunk/qpid/java/build.deps 1233097 
  /trunk/qpid/java/build.xml 1233097 

Diff: https://reviews.apache.org/r/3540/diff


Testing
-------

Java build and test-suite execution.


Thanks,

Weston


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189821#comment-13189821 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/#review4487
-----------------------------------------------------------



/trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
<https://reviews.apache.org/r/3540/#comment10072>

    I'd suggest using the QpidBrokerTestCase.DEFAULT_PORT as the port number rather than hardcoding 15672.
    
    



/trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
<https://reviews.apache.org/r/3540/#comment10076>

    I'd suggest a better name would be something like "testSessionCommitOnClosedConnectionThrowsException"



/trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
<https://reviews.apache.org/r/3540/#comment10073>

    Whilst it is true that Session#createSession ignores the second argument (acknowledgeMode) if the first argument (transacted) is true, for me the code is more obvious if you write:
    
    c.createSession(true, Session.SESSION_TRANSACTED);



/trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
<https://reviews.apache.org/r/3540/#comment10075>

    You'd normally only #acknowledge() on a message that has been received by a Consumer within a CLIENT_ACK Session.  I don't understand the meaning of acknowledging a newly created message.
    
    I can see it serves your purpose (testing your change to call sessionInternal), but I don't think this represents useful end to end test in this form.
    
    
    
    


- Keith


On 2012-01-19 00:32:22, Weston Price wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3540/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-19 00:32:22)
bq.  
bq.  
bq.  Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.
bq.  
bq.  Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 
bq.  
bq.  While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 
bq.  
bq.  To get things started I have added two tests classes:
bq.  
bq.  qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
bq.  
bq.  This is a system test class with two tests that test the following JIRA's
bq.  
bq.  https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
bq.  https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().
bq.  
bq.  Results:
bq.  [junit] Running org.apache.qpid.ra.QpidRAConnectionTest
bq.  [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec
bq.  
bq.  
bq.  qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java
bq.  
bq.  This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.
bq.  
bq.  Results:
bq.   [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
bq.   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
bq.   
bq.  
bq.  Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.
bq.  
bq.  
bq.  This addresses bug QPID-3751.
bq.      https://issues.apache.org/jira/browse/QPID-3751
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /trunk/qpid/java/build.deps 1233097 
bq.    /trunk/qpid/java/build.xml 1233097 
bq.    /trunk/qpid/java/jca/example/.gitignore 1233097 
bq.    /trunk/qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java PRE-CREATION 
bq.    /trunk/qpid/java/systests/build.xml 1233097 
bq.    /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java PRE-CREATION 
bq.    /trunk/qpid/java/.gitignore PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3540/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Java build and test-suite execution.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Weston
bq.  
bq.


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price updated QPID-3751:
----------------------------------

    Attachment: QPID-3751.patch

Adding updated patch as per comments, suggestions via ReviewBoard.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: QPID-3751.patch, jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Reopened] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Keith Wall (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Wall reopened QPID-3751:
------------------------------


Last night's commit has broken the 0-9-1 builds.  Please see:

https://builds.apache.org/view/M-R/view/Qpid/job/Qpid-Java-Java-MMS-TestMatrix/8/

                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Resolved] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price resolved QPID-3751.
-----------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: Future)

This has been resolved on trunk with the attached patch and the helpful comments from the review board.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Updated] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price updated QPID-3751:
----------------------------------

    Attachment:     (was: jca-testing.patch)
    
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Updated] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price updated QPID-3751:
----------------------------------

    Attachment: jca-testing.patch

Adding patch to include new unit/system tests as well as supporting build file modifications.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rajith Attapattu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229265#comment-13229265 ] 

Rajith Attapattu commented on QPID-3751:
----------------------------------------

Robbie, indeed the goal should be for the JCA adapter to work with both C++ and Java broker.
However the JCA stuff uses XA quite extensively. 
I believe the Java broker is yet to add support for this? (I stand to be corrected though).

So for the time being (as a temp measure) Weston and I decided to run JCA system tests only against the C++ broker.
I presume, Weston will be adding more tests in the future. And at some point we should run these tests against the Java broker and see where it stands. Hopefully we get to this stage sooner than later as there will be users who would want to use the JCA adapter with the Qpid Java broker.

                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Updated] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Updated) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Weston M. Price updated QPID-3751:
----------------------------------

    Fix Version/s: Future
                   0.15
    
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Resolved] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rob Godfrey (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Godfrey resolved QPID-3751.
-------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 0.15)
                   0.17

Resolving as tests are no longer failing against the Java Broker, but are now at least being run against it in the 0-10 protocol
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.17
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rob Godfrey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229266#comment-13229266 ] 

Rob Godfrey commented on QPID-3751:
-----------------------------------

Rajith, the Qpid Java Broker now supports XA, see: https://issues.apache.org/jira/browse/QPID-24

As Robbie says, the test was already passing against the Java Broker with the 0-10 protocol.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rajith Attapattu (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229224#comment-13229224 ] 

Rajith Attapattu commented on QPID-3751:
----------------------------------------

I've excluded the JCA system test from the Java broker.
The build should be back to normal. We apologize for the oversight.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13188836#comment-13188836 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/
-----------------------------------------------------------

(Updated 2012-01-19 00:32:22.696911)


Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.


Changes
-------

Whoops. Wrong diff originally uploaded. JCA test classes have now been included.


Summary
-------

The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.

Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 

While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 

To get things started I have added two tests classes:

qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java

This is a system test class with two tests that test the following JIRA's

https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().

Results:
[junit] Running org.apache.qpid.ra.QpidRAConnectionTest
[junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec


qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java

This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.

Results:
 [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
 [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
 

Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.


This addresses bug QPID-3751.
    https://issues.apache.org/jira/browse/QPID-3751


Diffs (updated)
-----

  /trunk/qpid/java/build.deps 1233097 
  /trunk/qpid/java/build.xml 1233097 
  /trunk/qpid/java/jca/example/.gitignore 1233097 
  /trunk/qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java PRE-CREATION 
  /trunk/qpid/java/systests/build.xml 1233097 
  /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java PRE-CREATION 
  /trunk/qpid/java/.gitignore PRE-CREATION 

Diff: https://reviews.apache.org/r/3540/diff


Testing
-------

Java build and test-suite execution.


Thanks,

Weston


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Reopened] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rob Godfrey (Reopened) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rob Godfrey reopened QPID-3751:
-------------------------------


I see no patch applied to trunk that fixes the braking of the java 0-9-1 build that was introduced yesterday. See the above comment from Keith Wall. 

Please do not resolve until this is fixed!
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189823#comment-13189823 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------



bq.  On 2012-01-20 14:18:52, Keith Wall wrote:
bq.  > /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java, line 36
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69867#file69867line36>
bq.  >
bq.  >     I'd suggest using the QpidBrokerTestCase.DEFAULT_PORT as the port number rather than hardcoding 15672.
bq.  >     
bq.  >

Agreed will fix.


bq.  On 2012-01-20 14:18:52, Keith Wall wrote:
bq.  > /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java, line 38
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69867#file69867line38>
bq.  >
bq.  >     I'd suggest a better name would be something like "testSessionCommitOnClosedConnectionThrowsException"

Agreed will fix.


bq.  On 2012-01-20 14:18:52, Keith Wall wrote:
bq.  > /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java, line 75
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69867#file69867line75>
bq.  >
bq.  >     You'd normally only #acknowledge() on a message that has been received by a Consumer within a CLIENT_ACK Session.  I don't understand the meaning of acknowledging a newly created message.
bq.  >     
bq.  >     I can see it serves your purpose (testing your change to call sessionInternal), but I don't think this represents useful end to end test in this form.
bq.  >     
bq.  >     
bq.  >     
bq.  >

Agree in principle, however setting up a consumer using JCA without an app server is problematic. The code was added simply to test the patch without having to write a significant amount of mock code for this one condition.


bq.  On 2012-01-20 14:18:52, Keith Wall wrote:
bq.  > /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java, line 46
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69867#file69867line46>
bq.  >
bq.  >     Whilst it is true that Session#createSession ignores the second argument (acknowledgeMode) if the first argument (transacted) is true, for me the code is more obvious if you write:
bq.  >     
bq.  >     c.createSession(true, Session.SESSION_TRANSACTED);

Agreed will change.


- Weston


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/#review4487
-----------------------------------------------------------


On 2012-01-19 00:32:22, Weston Price wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3540/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-19 00:32:22)
bq.  
bq.  
bq.  Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.
bq.  
bq.  Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 
bq.  
bq.  While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 
bq.  
bq.  To get things started I have added two tests classes:
bq.  
bq.  qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
bq.  
bq.  This is a system test class with two tests that test the following JIRA's
bq.  
bq.  https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
bq.  https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().
bq.  
bq.  Results:
bq.  [junit] Running org.apache.qpid.ra.QpidRAConnectionTest
bq.  [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec
bq.  
bq.  
bq.  qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java
bq.  
bq.  This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.
bq.  
bq.  Results:
bq.   [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
bq.   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
bq.   
bq.  
bq.  Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.
bq.  
bq.  
bq.  This addresses bug QPID-3751.
bq.      https://issues.apache.org/jira/browse/QPID-3751
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /trunk/qpid/java/build.deps 1233097 
bq.    /trunk/qpid/java/build.xml 1233097 
bq.    /trunk/qpid/java/jca/example/.gitignore 1233097 
bq.    /trunk/qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java PRE-CREATION 
bq.    /trunk/qpid/java/systests/build.xml 1233097 
bq.    /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java PRE-CREATION 
bq.    /trunk/qpid/java/.gitignore PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3540/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Java build and test-suite execution.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Weston
bq.  
bq.


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232626#comment-13232626 ] 

Weston M. Price commented on QPID-3751:
---------------------------------------

Thanks. 

BTW, there was other, protocol related issues in the tests that warrant exclusion as non of the JCA tests at this point exercise XA functionality. I will take a look at exactly what the issue is.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.17
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Robbie Gemmell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229250#comment-13229250 ] 

Robbie Gemmell commented on QPID-3751:
--------------------------------------

The test only needed to be excluded from the Pre0-10 profiles due to its reliance on 0-10. It had presumably already passed on the 0-10 java profile.

We really need to get away from the idea that certain things are 'for the C++ broker' or 'for the Java broker'. There might not have have been extensive(/any) testing performed to certify the JCA adapters use against the Java broker, but that doesnt necessarily mean it wont work and being based on a common AMQP 0-10 client it could realistically be expected to do so. Certainly, automated tests are one way to verify that to some extent if nothing else was done (another reason I was so keen that it should have unit and system tests originally, beyond the simple fact that it should have either way) and so any such tests that exist and are passing should at least be allowed to continue running.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189149#comment-13189149 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/#review4471
-----------------------------------------------------------


I've found a few nits:


/trunk/qpid/java/.gitignore
<https://reviews.apache.org/r/3540/#comment10025>

    Not sure if this files needs to be checked in.



/trunk/qpid/java/build.xml
<https://reviews.apache.org/r/3540/#comment10024>

    There seems to be no actual change to this file, why check it in.



/trunk/qpid/java/jca/example/.gitignore
<https://reviews.apache.org/r/3540/#comment10026>

    I don't know what file type .swp is, but you've added to to several .gitignore files - why not add it to a .gitignore higher in the file hierarchy.


- Andrew


On 2012-01-19 00:32:22, Weston Price wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3540/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-19 00:32:22)
bq.  
bq.  
bq.  Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.
bq.  
bq.  Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 
bq.  
bq.  While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 
bq.  
bq.  To get things started I have added two tests classes:
bq.  
bq.  qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
bq.  
bq.  This is a system test class with two tests that test the following JIRA's
bq.  
bq.  https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
bq.  https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().
bq.  
bq.  Results:
bq.  [junit] Running org.apache.qpid.ra.QpidRAConnectionTest
bq.  [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec
bq.  
bq.  
bq.  qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java
bq.  
bq.  This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.
bq.  
bq.  Results:
bq.   [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
bq.   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
bq.   
bq.  
bq.  Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.
bq.  
bq.  
bq.  This addresses bug QPID-3751.
bq.      https://issues.apache.org/jira/browse/QPID-3751
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /trunk/qpid/java/build.deps 1233097 
bq.    /trunk/qpid/java/build.xml 1233097 
bq.    /trunk/qpid/java/jca/example/.gitignore 1233097 
bq.    /trunk/qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java PRE-CREATION 
bq.    /trunk/qpid/java/systests/build.xml 1233097 
bq.    /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java PRE-CREATION 
bq.    /trunk/qpid/java/.gitignore PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3540/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Java build and test-suite execution.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Weston
bq.  
bq.


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Robbie Gemmell (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229280#comment-13229280 ] 

Robbie Gemmell commented on QPID-3751:
--------------------------------------

Hi Weston,

Its possible to exclude tests from all the non 0-10 protocols in as opposed to just the whole broker. 

As Rob mentioned, the Java broker now has 0-10 XA support. If there are specific new tests that fail against the Java broker with 0-10 then I'm happy for those to be excluded entirely until such time as they can be made to pass, I just dont want to see us excluding tests that are able to run successfully. To do so removes the ability to know when things get broken, and lets us accumulate great lists of tests that we dont necessarily know why they are excluded (we spent a long time going through those recently, it was painful and I am not doing it again).

Robbie
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Weston M. Price (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13229269#comment-13229269 ] 

Weston M. Price commented on QPID-3751:
---------------------------------------

Hi Robbie,
  I agree in principal and if it were only 0.10 we were talking about, I don't think there would be an issue. The problem was I forgot to exclude the tests from the 0.9x profile so this was my failing. The tests that are included do indeed work with the 0.10 profile against the Java broker but in the interim, because of the disruption to you and your team, we wanted to unblock you as quickly as possible. 

As Rajith mentioned, JCA makes heavy use of XA, but I don't see this as being an impediment to most testing efforts. If XA is indeed involved, then we can simply exclude on a test by test basis.


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "Rob Godfrey (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13232527#comment-13232527 ] 

Rob Godfrey commented on QPID-3751:
-----------------------------------

I have re-enabled the tests for the Java Broker but excluded them for the pre-0-10 protocols.  Verified that both the 0-10 and 0-9-1 test runs pass against the memory message store.

Ideally someone should go in and make the exclusion for pre-0-10 a little less blanket that "all tests" if the only issue is XA transaction support.
                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15
>
>         Attachments: QPID-3751.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


[jira] [Commented] (QPID-3751) Add Unit/System Testing to JCA Component

Posted by "jiraposter@reviews.apache.org (Commented) (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/QPID-3751?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13189150#comment-13189150 ] 

jiraposter@reviews.apache.org commented on QPID-3751:
-----------------------------------------------------



bq.  On 2012-01-19 15:10:21, Andrew Stitcher wrote:
bq.  > /trunk/qpid/java/build.xml, line 1
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69863#file69863line1>
bq.  >
bq.  >     There seems to be no actual change to this file, why check it in.

I automatically remove trailing whitespaces when saving a file, this appears to be what that is.


bq.  On 2012-01-19 15:10:21, Andrew Stitcher wrote:
bq.  > /trunk/qpid/java/jca/example/.gitignore, line 3
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69864#file69864line3>
bq.  >
bq.  >     I don't know what file type .swp is, but you've added to to several .gitignore files - why not add it to a .gitignore higher in the file hierarchy.

*.swp is a temp VIM file that gets generated when VIM has open files. I will add it higher in the hierarchy.


bq.  On 2012-01-19 15:10:21, Andrew Stitcher wrote:
bq.  > /trunk/qpid/java/.gitignore, line 1
bq.  > <https://reviews.apache.org/r/3540/diff/2/?file=69861#file69861line1>
bq.  >
bq.  >     Not sure if this files needs to be checked in.

I can try using the .gitignore file already in use in the tree.


- Weston


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/3540/#review4471
-----------------------------------------------------------


On 2012-01-19 00:32:22, Weston Price wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/3540/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-01-19 00:32:22)
bq.  
bq.  
bq.  Review request for qpid, Gordon Sim, Robbie Gemmell, rajith attapattu, and Keith Wall.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  The following patch adds the necessary changes to add system tests as well as unit tests to the Qpid JCA subproject. Although we use the TCK (internal) to test the JCA adapter, the lack of an application server should not prohibit testing in the JCA project. While full integration testing might not be possible, we do provide a non-managed javax.resource.spi.ConnectionManager that allows us to acquire a javax.jms.Connection/javax.jms.Session etc (non-pooled, no auto XA enlistment) which in turn allows for system testing. Unit testing can also be achieved similar to the other Qpid Java sub projects. Also, this will allow us to add mock objects where appropriate without having to bring in an entire JEE environment.
bq.  
bq.  Note, the JCA examples also provide a 'smoke test' like framework, however, more testing really needs to be added and maintained as was initially identified in the Qpid JCA review prior to the adapter being included in the Qpid project. 
bq.  
bq.  While the Qpid JCA adapter only officially supports the C++ broker, a majority of the tests can be used with the Java Broker other than XA specific tests which can be excluded using the normal exclusion mechanism. 
bq.  
bq.  To get things started I have added two tests classes:
bq.  
bq.  qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java
bq.  
bq.  This is a system test class with two tests that test the following JIRA's
bq.  
bq.  https://issues.apache.org/jira/browse/QPID-3700 -- check for javax.jms.IllegalStateException for Session.commit() when a connection has been closed
bq.  https://issues.apache.org/jira/browse/QPID-3731 -- QpidRAMessage should call session.getSessionInternal() to determine if the underlying session has been closed prior to calling message.acknowledge().
bq.  
bq.  Results:
bq.  [junit] Running org.apache.qpid.ra.QpidRAConnectionTest
bq.  [junit] Tests run: 2, Failures: 0, Errors: 0, Time elapsed: 2.75 sec
bq.  
bq.  
bq.  qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java
bq.  
bq.  This is a unit test class that tests for the correct return value in the QpidResourceAdapter.getXAResources() call. Note, there is no corresponding JIRA for this test as it was implemented prior to the JCA being committed to the main repo.
bq.  
bq.  Results:
bq.   [junit] Running org.apache.qpid.ra.QpidResourceAdapterTest
bq.   [junit] Tests run: 1, Failures: 0, Errors: 0, Time elapsed: 0.129 sec
bq.   
bq.  
bq.  Note, while it might seem to be overkill to review a patch that simply adds testing to a sub-project, I had to touch a few files outside of the JCA tree and I thought a review was in order.
bq.  
bq.  
bq.  This addresses bug QPID-3751.
bq.      https://issues.apache.org/jira/browse/QPID-3751
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    /trunk/qpid/java/build.deps 1233097 
bq.    /trunk/qpid/java/build.xml 1233097 
bq.    /trunk/qpid/java/jca/example/.gitignore 1233097 
bq.    /trunk/qpid/java/jca/src/test/java/org/apache/qpid/ra/QpidResourceAdapterTest.java PRE-CREATION 
bq.    /trunk/qpid/java/systests/build.xml 1233097 
bq.    /trunk/qpid/java/systests/src/main/java/org/apache/qpid/ra/QpidRAConnectionTest.java PRE-CREATION 
bq.    /trunk/qpid/java/.gitignore PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/3540/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Java build and test-suite execution.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Weston
bq.  
bq.


                
> Add Unit/System Testing to JCA Component
> ----------------------------------------
>
>                 Key: QPID-3751
>                 URL: https://issues.apache.org/jira/browse/QPID-3751
>             Project: Qpid
>          Issue Type: Improvement
>          Components: JCA
>         Environment: All OS platforms, all JEE supported platforms.
>            Reporter: Weston M. Price
>            Assignee: Weston M. Price
>             Fix For: 0.15, Future
>
>         Attachments: jca-testing.patch
>
>
> Currently the JCA component/code lacks any unit testing as well as any integration testing. Further, the necessary configuration isn't in place to allow for this to work as it stand today. Originally we were using our internal TCK in conjunction with the JCA examples to test the adapter. It was initially thought that the requirement of a running application server was a 'must have' and introducing this requirement into the test framework would be too disruptive. 
> I have had time (finally) to reconsider this. Being that we provide a non-managed (i.e. non JEE) javax.resource.spi.ConnectionManager there is a good amount of unit testing we can do, as we as being able to provide contributions to the system tests. Further, for certain tests that require app server functionality, simple mock objects can be useful. While we only officially support the C++ broker for JCA, this shouldn't impede unit or system testing as the Java broker is sufficient to at least cover a majority of our test cases. For those future tests that actually require the C++ broker we can use the excludes mechanism and address this need at that time.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org