[java-opensaml COMMIT] /trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMe...
noreply at shibboleth.net
noreply at shibboleth.net
Wed Mar 20 21:54:08 EDT 2013
Author: putmanb
Date: Wed Mar 20 21:54:08 2013
New Revision: 3272
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3272&view=rev
Log:
Additional test logic for JOST-206.
Modified:
trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java
Modified: trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java?rev=3272&r1=3271&r2=3272&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java (original)
+++ trunk/opensaml-saml-impl/src/test/java/org/opensaml/saml/saml2/metadata/provider/FilesystemMetadataProviderTest.java Wed Mar 20 21:54:08 2013
@@ -202,6 +202,15 @@
Assert.fail("Filesystem metadata provider init failed with non-existent file and fail fast = false");
}
+ // Test that things don't blow up when initialized, no fail fast, but have no data.
+ try {
+ Assert.assertNull(metadataProvider.getMetadata());
+ EntityDescriptor entity = metadataProvider.getEntityDescriptor(entityID);
+ Assert.assertNull(entity, "Retrieved entity descriptor was not null");
+ } catch (MetadataProviderException e) {
+ Assert.fail("Metadata provider behaved non-gracefully when initialized with fail fast = false");
+ }
+
// Filesystem timestamp may only have 1-second precision, so need to sleep for a couple of seconds just
// to make sure that the new copied file's timestamp is later than the Jodatime lastRefresh time
// in the metadata provider.
More information about the commits
mailing list