To run the Clustered Portlet Session tests, follow the steps:
Setup ports-01 and ports-02 according to the clustering configuration of the reference guide (ch 8) - make sure you configure the Binding manager. Do not copy jboss-portal-ha.sar as mentioned in Chapter 8. You only need to do modifications to jboss-service.xml for ports-01 and ports-02 server configuration.
deploy the test agent (test\output\lib\portal-test.sar) in deploy dir of both clusters
do ant package-tests in portlet module
in portlet-server module
Do ant package-tests
deploy portlet-server\output\lib\test.sar in deploy dir of both clusters
start up both nodes
run test-ha target
There are three test cases in SessionTestCase. One of them does not pass all the time. It needs to be fixed but has not been fixed yet.
How to test the clustered distribution:
Make sure to undeploy all the test agents that you deployed for previous test.
Get jboss-portal-ha.sar from build/output/ jboss-portal-ha-2.6-VERSION.zip deploy it to both clusters' all configuration, and follow the instructions in chapter 8 of the Reference Guide on how to change the Application Server descriptors (the portal descriptors in the HA distribution have already been changed for you).
Use MySql5 or any non in-memory database for these tests.
Run some Admin GUI tests in clustered mode as well. This verifies that database schema is compatible with at least one database that will be used in production. There was an issue with WSRP table which did not manifest in HSQL but did in MySql.
Test starting both clusters at the same, one by one and make sure that you are able to hit portal page on each node directly. (See JBPORTAL-1879)
JBoss Cache Upgrade instructions:
In addition to setting up jboss-portal-ha.sar, make sure your jboss cache libraries are up to date. The application server ships with version 1.2.4.SP2 and this needs to be upgraded to 1.4.0.SP1 or above. The thirdparty component of jboss portal distribution carries these upgraded jars. To upgrade your jboss cache you can run /build.xml deploy-ha and it will upgrade jboss cache in your designated application server. Note: make sure all your nodes that are being setup for cluster testing are upgraded.
start up both nodes
Portal Session Replication:
navigate to a portlet window and maximize the portlet - the window state changes, then shut down this node and navigate to the same window (now on the other node, that is still running) and check if the state has been replicated correctly.
again using two nodes, add a portlet to a window through one of the nodes and stop it, the portlet should be present in the window after we move to the second node (which in fact would also test authentication clustering)
log in as user or admin to one of the nodes and stop it - the admin visible pages should still be present when the portal fails over to the second node
create a file on one of the nodes and stop it, the file should be present through the other node. (Do make sure you are using a database other than the default HSQLDB, so changes are stored in the distributed DB.
the easiest way I could think of checking this is with the weather portlet - change the ZIP code on one node, stop it and check if the changes persist.
Portlet Session Replication:
Prabhat will add the detail