Class DynamicMetadataCacheTest
- java.lang.Object
-
- net.shibboleth.oidc.metadata.cache.impl.DynamicMetadataCacheTest
-
public class DynamicMetadataCacheTest extends Object
Test for the MetadataCache.
-
-
Field Summary
Fields Modifier and Type Field Description private net.shibboleth.oidc.metadata.cache.impl.DynamicMetadataCache<com.nimbusds.oauth2.sdk.id.Issuer,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>cacheThe cache.private Function<CriteriaSet,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata>defaultFetchStrategyA default fetching strategy.private org.slf4j.LoggerlogClass logger.
-
Constructor Summary
Constructors Constructor Description DynamicMetadataCacheTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) voidsetup()voidtearDown()voidtestBackgroundCleanup_Expired_Success()voidtestBackgroundCleanup_Idle_Success()voidtestCacheNotInitialized()voidtestFetchFailsAndCachedIsExpired()voidtestGetCached_Success()voidtestGetNotCached_Success()voidtestGetNotCached_WrongCriteria_Fail()voidtestGetNotCached_WrongIdentifier_Fail()voidtestMultiGet_Success()voidtestPreExpiredMetadata()voidtestStaleMetadata_Success()
-
-
-
Field Detail
-
log
private final org.slf4j.Logger log
Class logger.
-
cache
private net.shibboleth.oidc.metadata.cache.impl.DynamicMetadataCache<com.nimbusds.oauth2.sdk.id.Issuer,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata> cache
The cache.
-
defaultFetchStrategy
@Nonnull private Function<CriteriaSet,com.nimbusds.openid.connect.sdk.op.OIDCProviderMetadata> defaultFetchStrategy
A default fetching strategy.
-
-
Method Detail
-
setup
@BeforeMethod void setup() throws Exception
- Throws:
Exception
-
tearDown
@AfterMethod public void tearDown()
-
testBackgroundCleanup_Expired_Success
public void testBackgroundCleanup_Expired_Success() throws ComponentInitializationException, URISyntaxException, InterruptedException
-
testFetchFailsAndCachedIsExpired
public void testFetchFailsAndCachedIsExpired() throws Exception- Throws:
Exception
-
testBackgroundCleanup_Idle_Success
public void testBackgroundCleanup_Idle_Success() throws Exception- Throws:
Exception
-
testStaleMetadata_Success
public void testStaleMetadata_Success() throws Exception- Throws:
Exception
-
testGetNotCached_Success
public void testGetNotCached_Success() throws net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
net.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
testGetNotCached_WrongIdentifier_Fail
public void testGetNotCached_WrongIdentifier_Fail() throws net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
net.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
testGetNotCached_WrongCriteria_Fail
public void testGetNotCached_WrongCriteria_Fail() throws net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
net.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
testMultiGet_Success
public void testMultiGet_Success() throws InterruptedException, ExecutionException, net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
InterruptedExceptionExecutionExceptionnet.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
testGetCached_Success
public void testGetCached_Success() throws net.shibboleth.oidc.metadata.cache.MetadataCacheException, ComponentInitializationException- Throws:
net.shibboleth.oidc.metadata.cache.MetadataCacheExceptionComponentInitializationException
-
-