Fix session timeout default value
Update DEFAULT_SESSION_TIMEOUT to use TimeUnit.MINUTES.toSeconds(30) rather than TimeUnit.SECONDS.toMinutes(30) which would always return 0. See gh-2084
This commit is contained in:
parent
4fc8a183f2
commit
b33bbd56e7
|
@ -37,8 +37,8 @@ import org.springframework.util.Assert;
|
|||
public abstract class AbstractConfigurableEmbeddedServletContainer implements
|
||||
ConfigurableEmbeddedServletContainer {
|
||||
|
||||
private static final int DEFAULT_SESSION_TIMEOUT = (int) TimeUnit.SECONDS
|
||||
.toMinutes(30);
|
||||
private static final int DEFAULT_SESSION_TIMEOUT = (int) TimeUnit.MINUTES
|
||||
.toSeconds(30);
|
||||
|
||||
private String contextPath = "";
|
||||
|
||||
|
|
|
@ -534,6 +534,11 @@ public abstract class AbstractEmbeddedServletContainerFactoryTests {
|
|||
equalTo("test"));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultSessionTimeout() throws Exception {
|
||||
assertThat(getFactory().getSessionTimeout(), equalTo(30 * 60));
|
||||
}
|
||||
|
||||
protected String getLocalUrl(String resourcePath) {
|
||||
return getLocalUrl("http", resourcePath);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue