399132 check parent dir of session store against file to be removed

This commit is contained in:
Jan Bartel 2013-01-27 10:18:27 +11:00
parent 2cbb630f8e
commit 497acc8555
1 changed files with 10 additions and 2 deletions

View File

@ -21,6 +21,7 @@ package org.eclipse.jetty.server.session;
import java.io.File;
import org.eclipse.jetty.server.SessionManager;
import org.junit.Assert;
import org.junit.Test;
public class SessionRenewTest extends AbstractSessionRenewTest
@ -40,7 +41,14 @@ public class SessionRenewTest extends AbstractSessionRenewTest
File tmpDir = new File(System.getProperty("java.io.tmpdir"), "hash-session-renew-test");
tmpDir.deleteOnExit();
tmpDir.mkdirs();
try
{
sessionManager.setStoreDirectory(tmpDir);
}
catch (Exception e)
{
throw new IllegalStateException(e);
}
return sessionManager;
}