Add Javadoc.

Format source code.

Optimize imports.

Remove unnecessary throws IOException from the SpringSessionDataGemFireServerConfiguration.main() method.

Apply appropriate @SuppressWarnings annotations.
This commit is contained in:
John Blum
2020-02-25 09:18:14 -08:00
parent 3ac2b6943c
commit 3cd86b929d

View File

@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.session.data.gemfire;
import static org.assertj.core.api.Assertions.assertThat;
@@ -25,7 +24,10 @@ import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.apache.geode.cache.EntryEvent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.data.gemfire.config.annotation.CacheServerApplication;
@@ -40,10 +42,24 @@ import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
/**
* The ClientServerProxyRegionSessionOperationsIntegrationTests class...
* Integration Tests testing the proper behavior of Spring Session for Apache Geode & Pivotal GemFire
* Session event handling, and specifically, translation between GemFire/Cache cache {@link EntryEvent EntryEvents}
* and Spring container {@link ApplicationEvent ApplicationEvents}.
*
* @author John Blum
* @since 1.0.0
* @see org.apache.geode.cache.EntryEvent
* @see org.junit.Test
* @see org.springframework.context.ApplicationEvent
* @see org.springframework.context.annotation.AnnotationConfigApplicationContext
* @see org.springframework.data.gemfire.config.annotation.CacheServerApplication
* @see org.springframework.data.gemfire.config.annotation.ClientCacheApplication
* @see org.springframework.session.data.gemfire.config.annotation.web.http.EnableGemFireHttpSession
* @see org.springframework.session.events.SessionCreatedEvent
* @see org.springframework.session.events.SessionDeletedEvent
* @see org.springframework.session.events.SessionExpiredEvent
* @see org.springframework.test.context.ContextConfiguration
* @see org.springframework.test.context.junit4.SpringRunner
* @since 1.1.0
*/
@RunWith(SpringRunner.class)
@ContextConfiguration(
@@ -53,7 +69,8 @@ public class ClientServerProxyRegionSessionOperationsIntegrationTests extends Ab
private static final int MAX_INACTIVE_INTERVAL_IN_SECONDS = 1;
@Autowired @SuppressWarnings("all")
@Autowired
@SuppressWarnings("unused")
private SessionEventListener sessionEventListener;
@BeforeClass
@@ -64,6 +81,7 @@ public class ClientServerProxyRegionSessionOperationsIntegrationTests extends Ab
@Test
public void createReadUpdateExpireRecreateDeleteRecreateSessionResultsCorrectSessionCreatedEvents() {
// CREATE
Session session = save(touch(createSession()));
assertValidSession(session);
@@ -129,7 +147,6 @@ public class ClientServerProxyRegionSessionOperationsIntegrationTests extends Ab
}
@ClientCacheApplication(
logLevel = "error",
pingInterval = 5000,
readTimeout = 2000,
retryAttempts = 1,
@@ -154,7 +171,7 @@ public class ClientServerProxyRegionSessionOperationsIntegrationTests extends Ab
static class SpringSessionDataGemFireServerConfiguration {
@SuppressWarnings("resource")
public static void main(String[] args) throws IOException {
public static void main(String[] args) {
AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(SpringSessionDataGemFireServerConfiguration.class);