-
Notifications
You must be signed in to change notification settings - Fork 2
Testing
Tests that are made manually, with debug on, only local glassfish, looking all the operations are performed correctly. Clusterjsp application is used:
-
Start a new session. Clear all cookies in the browser and start a new session. The session is requested to be created (createSession) and it is locked while creation. Then the unlock and the save (always a save).
-
Update test. The session is located in internal map and returned. The lock and unlock operations are executed and finally a save (set or cas) is done.
-
Refresh test. The session is located in internal masp. Lock and unlock but now onlu a touch is performed (or touch and unlock in non-sticky).
-
Refresh after long time not saving. Al thought it is a refresh the session is saved in ouchbase (same tha point 2).
-
Test of session recover. Stop and start the domain. The session is not found locally so it is searched in couchbase. It is recovered, locked an unlocked. Always saved cos it is just created again.
-
Session invalidation. Session is found locally, locked but then removed. The session is removed from couchbase and after that from the local pool. Glassfish checks expiration after the invalidation, there is a race, it can happen to be completely deleted and it is searched again in couchbase and not found or it can be found locally but in not found (deleted state).
-
Test with a invalidated session. After the deletion, push back browser button and refresh. The session is searched both locally and in couchbase but not found. A new session is requested to be created (the rest of the process is exactly the same as 1).
-
Expiration time. Wait the session timeout (10 min in my examples), check the processExpires finally detected the session as expired background lock it, check it does not exists in couchbase, and delete it from local pool.
-
Error in couchbase. Create a new session and then stop couchbase. CLick the application to check the session is put in ERROR state and a exception is returned. Start again the couchbase server. Click the application again. The session should be read from couchbase in the lock foreground (cos it is in ERROR), the a normal save is executed.
-
Repeat the tests twice (sticky and non-sticky).
How to install it?
Sticky vs Non-Sticky
[External atttibutes] (wiki/External-Attributes)
[JavaEE session listeners] (wiki/JavaEE-Session-Listeners)
[Compiling from github] (wiki/Compiling-from-github)
couchbase-manager-0.1
couchbase-manager-0.2
couchbase-manager-0.3
couchbase-manager-0.4
couchbase-manager-0.5