Skip to content

Added JASPIC tests that test whether a SAM can forward and include - #303

Merged
arjantijms merged 2 commits into
javaee-samples:masterfrom
arjantijms:jaspic
May 22, 2015
Merged

arjantijms merged 2 commits into
javaee-samples:masterfrom
arjantijms:jaspic

Conversation

@arjantijms

Copy link
Copy Markdown
Contributor

several kinds of resources

Tested on JBoss WildFly 8.2, GlassFish 4.1 and (with a small local modification) on WebLogic 12.1.3 (which is Java EE 6).

Several tests fail on each server. I'll be creating issues for them and in case of Mojarra probably look at fixing it myself (if it turns out to be Mojarra issue).

@arjantijms

Copy link
Copy Markdown
Contributor Author

p.s. failed checks are in totally unrelated batch tests, see:

Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.openjpa.enhance.ClassRedefiner.redefineClasses(ClassRedefiner.java:85)
... 34 more
Caused by: java.lang.VerifyError
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
... 39 more

May 19, 2015 11:13:22 PM org.apache.openejb.assembler.classic.Assembler destroyApplication
INFO: Undeploying app: /tmp/arquillian-tomee-app-working-dir/0/325e2b7d-ab22-4858-8491-3adb1b62e600
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 21.966 sec <<< FAILURE! - in org.javaee7.batch.chunk.csv.database.BatchCSVDatabaseTest
testBatchCSVDatabase(org.javaee7.batch.chunk.csv.database.BatchCSVDatabaseTest) Time elapsed: 11.186 sec <<< FAILURE!
java.lang.AssertionError: expected:<7> but was:<3>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.junit.Assert.assertEquals(Assert.java:542)
at org.javaee7.batch.chunk.csv.database.BatchCSVDatabaseTest.testBatchCSVDatabase(BatchCSVDatabaseTest.java:108)

May 19, 2015 11:13:22 PM sun.reflect.NativeMethodAccessorImpl invoke
INFO: Stopping ProtocolHandler ["http-bio-8080"]
May 19, 2015 11:13:22 PM sun.reflect.NativeMethodAccessorImpl invoke
INFO: Pausing ProtocolHandler ["http-bio-8080"]
May 19, 2015 11:13:22 PM sun.reflect.NativeMethodAccessorImpl invoke
INFO: Stopping service Tomcat
May 19, 2015 11:13:22 PM org.apache.openejb.assembler.classic.Assembler destroyResource
INFO: Closing DataSource: Default JDBC Database
May 19, 2015 11:13:22 PM org.apache.openejb.assembler.classic.Assembler destroyResource
INFO: Closing DataSource: Default Unmanaged JDBC Database
May 19, 2015 11:13:22 PM sun.reflect.NativeMethodAccessorImpl invoke
INFO: Destroying ProtocolHandler ["http-bio-8080"]

Results :

Failed tests:
BatchCSVDatabaseTest.testBatchCSVDatabase:108 expected:<7> but was:<3>

Tests run: 1, Failures: 1, Errors: 0, Skipped: 0

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Java EE 7 Sample: javaee7-samples .................. SUCCESS [ 44.902 s]
[INFO] Java EE 7 Sample: javaee7-samples - test-utils ..... SUCCESS [ 1.860 s]
[INFO] Java EE 7 Sample: javaee7-samples - util ........... SUCCESS [ 2.675 s]
[INFO] Java EE 7 Sample: batch ............................ SUCCESS [ 0.208 s]
[INFO] Java EE 7 Sample: batch - batchlet-simple .......... SUCCESS [ 23.287 s]
[INFO] Java EE 7 Sample: batch - chunk-checkpoint ......... SUCCESS [ 18.707 s]
[INFO] Java EE 7 Sample: batch - chunk-csv-database ....... FAILURE [ 24.650 s]

HttpServletRequest.getUserPrincipal
@arun-gupta

Copy link
Copy Markdown
Contributor

chunk-csv-database is failing?

@arjantijms

Copy link
Copy Markdown
Contributor Author

chunk-csv-database is failing?

Not 100% sure what is failing here, looks like something with the JPA class enhancer.

But it is a test that's failing, and of course more than a few tests fail (because of bugs in the server, or unsupported features).

The Travis CI build now aborts on the first test failure, which is what you would expect for builds in say a business project (they are supposed to have 0 failures). But for this project having a couple of failing tests is more or less the intention.

arjantijms added a commit that referenced this pull request May 22, 2015
Added JASPIC tests that test whether a SAM can forward and include
@arjantijms
arjantijms merged commit 557de80 into javaee-samples:master May 22, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants