Class BatchMetadataCacheTest
- java.lang.Object
-
- net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCacheTest
-
public class BatchMetadataCacheTest extends Object
Tests for theBatchMetadataCache.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCache<com.nimbusds.oauth2.sdk.id.Issuer,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>cacheprivate net.shibboleth.oidc.metadata.cache.LoadingStrategydefaultLoadingStrategyprivate Function<byte[],List<com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>>defaultParsingStrategyprivate ManuallyTriggeredScheduledExecutorServicescheduler
-
Constructor Summary
Constructors Constructor Description BatchMetadataCacheTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidsetup()voidtearDown()voidtestFetchAllNoDirectMatch()voidtestGetAndLoad_Success()voidtestGetNotCached_RefreshAHead_Success()voidtestGetNotCached_Success()voidtestGetWithNullReturnFromLoadingStrategy()voidtestInitialLoadFails()voidtestLoadGetRaceCondition()voidtestMetadataExpiryBelowMinDelay_UseMinDelay()voidtestMetadataExpiryGreaterThanMin_UseMetadataDelay()voidtestMetadataExpiryIsBeforeNow_UseMaxDelay()voidtestNormalRefreshDelay()voidtestNoUsableIdentifierInCriteria_EmptyList()voidtestSourceNotValid_Success()voidtestSourceNotValidMetadaNotValid_EntryAllreadyExist_Success()
-
-
-
Field Detail
-
cache
private net.shibboleth.oidc.metadata.cache.impl.BatchMetadataCache<com.nimbusds.oauth2.sdk.id.Issuer,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata> cache
-
scheduler
private ManuallyTriggeredScheduledExecutorService scheduler
-
defaultLoadingStrategy
private net.shibboleth.oidc.metadata.cache.LoadingStrategy defaultLoadingStrategy
-
-
Method Detail
-
setup
@BeforeMethod void setup() throws Exception
- Throws:
Exception
-
tearDown
@AfterMethod public void tearDown()
-
testNormalRefreshDelay
public void testNormalRefreshDelay() throws ComponentInitializationException, InterruptedException
-
testGetWithNullReturnFromLoadingStrategy
public void testGetWithNullReturnFromLoadingStrategy() throws Exception- Throws:
Exception
-
testFetchAllNoDirectMatch
public void testFetchAllNoDirectMatch() throws ComponentInitializationException, InterruptedException, net.shibboleth.oidc.metadata.cache.MetadataCacheException- Throws:
ComponentInitializationExceptionInterruptedExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheException
-
testInitialLoadFails
public void testInitialLoadFails() throws ComponentInitializationException, net.shibboleth.oidc.metadata.cache.MetadataCacheException- Throws:
ComponentInitializationExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheException
-
testMetadataExpiryBelowMinDelay_UseMinDelay
public void testMetadataExpiryBelowMinDelay_UseMinDelay() throws Exception- Throws:
Exception
-
testMetadataExpiryGreaterThanMin_UseMetadataDelay
public void testMetadataExpiryGreaterThanMin_UseMetadataDelay() throws ComponentInitializationException, net.shibboleth.oidc.metadata.cache.MetadataCacheException- Throws:
ComponentInitializationExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheException
-
testMetadataExpiryIsBeforeNow_UseMaxDelay
public void testMetadataExpiryIsBeforeNow_UseMaxDelay() throws ComponentInitializationException, net.shibboleth.oidc.metadata.cache.MetadataCacheException- Throws:
ComponentInitializationExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheException
-
testNoUsableIdentifierInCriteria_EmptyList
public void testNoUsableIdentifierInCriteria_EmptyList() throws Exception- Throws:
Exception
-
testSourceNotValid_Success
public void testSourceNotValid_Success() throws ComponentInitializationException, net.shibboleth.oidc.metadata.cache.MetadataCacheException- Throws:
ComponentInitializationExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheException
-
testSourceNotValidMetadaNotValid_EntryAllreadyExist_Success
public void testSourceNotValidMetadaNotValid_EntryAllreadyExist_Success() throws Exception- Throws:
Exception
-
testGetNotCached_RefreshAHead_Success
public void testGetNotCached_RefreshAHead_Success() throws net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
net.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
-