This change impacts everyone running Mojarra automated tests on
GlassFish 3.1. In particular, Roger and Sheetal need to read this
changebundle carefully.
This is the hudson job to watch
<
http://hudson-sca.us.oracle.com/view/Mojarra/job/JSF2.1-GF3.1/221/>.
Revision: 8769
Changes
Make the automated test infrastructure cluster aware when running in GlassFish 3.1
http://java.net/jira/browse/JAVASERVERFACES-1864
I have tested this on 3.1 with -Dforce.no.cluster=true, and without that
property.
I have tested this on 3.0.1.
It worked in all cases.
SECTION: Modified Files
----------------------------
M common/ant/glassfishV3.1/container.xml
- When running on 3.1 all in-container tests now run in a custom domain
created just for this purpose: mojarra-domain. This domain is
automatically created when the testing starts, and deleted when the
testing completes.
Unless the force.no.cluster system property is set to true, the tests
create an N node local cluster named mojarra-cluster. The number of
nodes is controlled via the instance.numbers property, which is a
comma separated list of integers between 1 and 5, with no duplicates.
The default value is
<property name="instance.numbers" value="1,2" />
- Introduce a new required target, define.cluster.aware.port. This is
important because the cluster port is different than the non-cluster
port. The V3.1 variant of this target takes special action depending
on if clustering is desired, the default, or not.
M common/ant/glassfish/container.xml
M common/ant/glassfishV3/container.xml
M common/ant/glassfishV3prelude/container.xml
M common/ant/tomcat6/container.xml
- Stub out the define.cluster.aware.port to just return container.port
because these containers do not natively support clustering.
M jsf-ri/build.xml
- change the ordering of tests. Now the order is systest, junit test,
systest-per-webapp, cactus test. Cactus doesn't seem to like
clustering so I run the cactus tests in non-clustered mode. That's
why cactus test is at the end.
M jsf-ri/build-tests.xml
M jsf-ri/systest/build-tests.xml
- pass the cluster.aware.port to the cactus tests. This is necessary
even in the non-clustered case, because of the new mojarra-domain
rules.
- Make test launching targets depend on define.cluster.aware.port
M jsf-ri/systest-per-webapp/build.xml
M jsf-ri/systest-per-webapp/build-tests.xml
M build.xml
M jsf-ri/systest/src/com/sun/faces/htmlunit/AbstractTestCase.java
- This is an important change. If clustering is enabled (the default)
requests will go to a random instance in the cluster. A new set of
sticky methods have been added for tests that want all requests in the
test to go to the same instance in the cluster.
M jsf-ri/systest/src/com/sun/faces/systest/FlashReaperTestCase.java
M jsf-ri/systest/src/com/sun/faces/systest/RenderKitsTestCase.java
M jsf-ri/systest-per-webapp/request-char-encoding-no-session/src/java/com/sun/faces/systest/NoSessionCharEncTestCase.java
- These tests require session stickiness, so they have to make their
requests all go to the same instance.
--
| ed.burns_at_sun.com | office: +1 407 458 0017
| homepage: | http://ridingthecrest.com/