org.apache.geode.modules.session

## Class TestSessionsBase

- java.lang.Object
- - org.apache.geode.modules.session.TestSessionsBase

-     public abstract class TestSessionsBase
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static int` | `port`
    `protected static DeltaSessionManager` | `sessionManager`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestSessionsBase()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setup()` Reset some data
    `static void` | `setupServer(DeltaSessionManager manager)`
    `static void` | `teardownClass()`
    `void` | `testBasicRegion()` Test that a session attribute gets set into the region too.
    `void` | `testCallback()` Test callback functionality.
    `void` | `testCommitSessionValveInvalidSession()`
    `void` | `testExtraSessionsNotCreated()` Test for issue #45 Sessions are being created for every request
    `void` | `testInvalidate()` Test that invalidating a session makes it's attributes inaccessible.
    `void` | `testIsNew()` Test that calling session.isNew() works for the initial as well as subsequent requests.
    `void` | `testLastAccessedTime()` Test for issue #46 lastAccessedTime is not updated at the start of the request, but only at the end.
    `void` | `testMultipleAttributeUpdates()` Test that multiple attribute updates, within the same request result in only the latest one being effective.
    `void` | `testRegionInvalidate()` Test that a session attribute gets removed from the region when the session is invalidated.
    `void` | `testRemoveAttribute()` Test that removing a session attribute also removes it from the region
    `void` | `testSanity()` Check that the basics are working
    `void` | `testSessionExpiration1()` Test setting the session expiration
    `void` | `testSessionExpiration2()` Test setting the session expiration via a property change as would happen under normal deployment conditions.
    `void` | `testSessionExpirationByContainer()` Test expiration of a session by the tomcat container, rather than gemfire expiration
    `void` | `testSessionPersists1()` Check that our session persists.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### sessionManager

          protected static DeltaSessionManager sessionManager

    - #### port

          protected static int port

  - ### Constructor Detail

    - #### TestSessionsBase

          public TestSessionsBase()

  - ### Method Detail

    - #### setupServer

          public static void setupServer(DeltaSessionManager manager)
                                  throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### teardownClass

          public static void teardownClass()
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setup

          public void setup()
                     throws java.lang.Exception

      Reset some data
      Throws:
        `java.lang.Exception`

    - #### testSanity

          public void testSanity()
                          throws java.lang.Exception

      Check that the basics are working
      Throws:
        `java.lang.Exception`

    - #### testCallback

          public void testCallback()
                            throws java.lang.Exception

      Test callback functionality. This is here really just as an example. Callbacks are useful to implement per test actions which can be defined within the actual test method instead of in a separate servlet class.
      Throws:
        `java.lang.Exception`

    - #### testIsNew

          public void testIsNew()
                         throws java.lang.Exception

      Test that calling session.isNew() works for the initial as well as subsequent requests.
      Throws:
        `java.lang.Exception`

    - #### testSessionPersists1

          public void testSessionPersists1()
                                    throws java.lang.Exception

      Check that our session persists. The values we pass in as query params are used to set attributes on the session.
      Throws:
        `java.lang.Exception`

    - #### testInvalidate

          public void testInvalidate()
                              throws java.lang.Exception

      Test that invalidating a session makes it's attributes inaccessible.
      Throws:
        `java.lang.Exception`

    - #### testSessionExpiration1

          public void testSessionExpiration1()
                                      throws java.lang.Exception

      Test setting the session expiration
      Throws:
        `java.lang.Exception`

    - #### testSessionExpiration2

          public void testSessionExpiration2()
                                      throws java.lang.Exception

      Test setting the session expiration via a property change as would happen under normal deployment conditions.
      Throws:
        `java.lang.Exception`

    - #### testSessionExpirationByContainer

          public void testSessionExpirationByContainer()
                                                throws java.lang.Exception

      Test expiration of a session by the tomcat container, rather than gemfire expiration
      Throws:
        `java.lang.Exception`

    - #### testRemoveAttribute

          public void testRemoveAttribute()
                                   throws java.lang.Exception

      Test that removing a session attribute also removes it from the region
      Throws:
        `java.lang.Exception`

    - #### testBasicRegion

          public void testBasicRegion()
                               throws java.lang.Exception

      Test that a session attribute gets set into the region too.
      Throws:
        `java.lang.Exception`

    - #### testRegionInvalidate

          public void testRegionInvalidate()
                                    throws java.lang.Exception

      Test that a session attribute gets removed from the region when the session is invalidated.
      Throws:
        `java.lang.Exception`

    - #### testMultipleAttributeUpdates

          public void testMultipleAttributeUpdates()
                                            throws java.lang.Exception

      Test that multiple attribute updates, within the same request result in only the latest one being effective.
      Throws:
        `java.lang.Exception`

    - #### testCommitSessionValveInvalidSession

          public void testCommitSessionValveInvalidSession()
                                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### testExtraSessionsNotCreated

          public void testExtraSessionsNotCreated()
                                           throws java.lang.Exception

      Test for issue #45 Sessions are being created for every request
      Throws:
        `java.lang.Exception`

    - #### testLastAccessedTime

          public void testLastAccessedTime()
                                    throws java.lang.Exception

      Test for issue #46 lastAccessedTime is not updated at the start of the request, but only at the end.
      Throws:
        `java.lang.Exception`