Search in sources :

Example 1 with SessionTimeoutHandler

use of org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler in project pentaho-kettle by pentaho.

the class MetaStoreSessionTimeoutHandlerTest method before.

@Before
public void before() {
    metaStore = mock(IMetaStore.class);
    sessionTimeoutHandler = mock(SessionTimeoutHandler.class);
    metaStoresessionTimeoutHandler = new MetaStoreSessionTimeoutHandler(metaStore, sessionTimeoutHandler);
}
Also used : MetaStoreSessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.MetaStoreSessionTimeoutHandler) MetaStoreSessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.MetaStoreSessionTimeoutHandler) SessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler) IMetaStore(org.pentaho.metastore.api.IMetaStore) Before(org.junit.Before)

Example 2 with SessionTimeoutHandler

use of org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler in project pentaho-kettle by pentaho.

the class RepositorySessionTimeoutHandlerTest method wrapMetastoreWithTimeoutHandler.

@Test
public void wrapMetastoreWithTimeoutHandler() throws Throwable {
    IMetaStore metaStore = mock(IMetaStore.class);
    doThrow(KettleRepositoryLostException.class).when(metaStore).createNamespace(any());
    SessionTimeoutHandler sessionTimeoutHandler = mock(SessionTimeoutHandler.class);
    IMetaStore wrappedMetaStore = RepositorySessionTimeoutHandler.wrapMetastoreWithTimeoutHandler(metaStore, sessionTimeoutHandler);
    wrappedMetaStore.createNamespace("TEST_NAMESPACE");
    verify(sessionTimeoutHandler).handle(any(), any(), any(), any());
}
Also used : RepositorySessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.RepositorySessionTimeoutHandler) SessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler) IMetaStore(org.pentaho.metastore.api.IMetaStore) Test(org.junit.Test)

Example 3 with SessionTimeoutHandler

use of org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler in project pentaho-kettle by pentaho.

the class RepositoryServiceSessionTimeoutHandlerTest method before.

@Before
public void before() {
    repositoryService = mock(RepositorySecurityManager.class);
    sessionTimeoutHandler = mock(SessionTimeoutHandler.class);
    metaStoresessionTimeoutHandler = new RepositoryServiceSessionTimeoutHandler(repositoryService, sessionTimeoutHandler);
}
Also used : RepositorySecurityManager(org.pentaho.di.repository.RepositorySecurityManager) SessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler) RepositoryServiceSessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.RepositoryServiceSessionTimeoutHandler) RepositoryServiceSessionTimeoutHandler(org.pentaho.di.ui.repo.timeout.RepositoryServiceSessionTimeoutHandler) Before(org.junit.Before)

Aggregations

SessionTimeoutHandler (org.pentaho.di.ui.repo.timeout.SessionTimeoutHandler)3 Before (org.junit.Before)2 IMetaStore (org.pentaho.metastore.api.IMetaStore)2 Test (org.junit.Test)1 RepositorySecurityManager (org.pentaho.di.repository.RepositorySecurityManager)1 MetaStoreSessionTimeoutHandler (org.pentaho.di.ui.repo.timeout.MetaStoreSessionTimeoutHandler)1 RepositoryServiceSessionTimeoutHandler (org.pentaho.di.ui.repo.timeout.RepositoryServiceSessionTimeoutHandler)1 RepositorySessionTimeoutHandler (org.pentaho.di.ui.repo.timeout.RepositorySessionTimeoutHandler)1