aboutsummaryrefslogtreecommitdiffstats
path: root/uitest/src/main/java/com/vaadin/tests/applicationservlet/SessionExpiration.java
blob: 3e5ccbf9cb5f0b095eecccb371ed131670bce3ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package com.vaadin.tests.applicationservlet;

import com.vaadin.server.VaadinRequest;
import com.vaadin.tests.components.AbstractTestUIWithLog;

public class SessionExpiration extends AbstractTestUIWithLog {

    @Override
    protected void setup(VaadinRequest request) {
        getSession().getSession().setMaxInactiveInterval(2);
        addButton("Click to avoid expiration", event -> log("Clicked"));
    }

    @Override
    protected String getTestDescription() {
        return "Test for what happens when the session expires (2 second expiration time).";
    }

    @Override
    protected Integer getTicketNumber() {
        return 12139;
    }
}