[java-opensaml2 COMMIT] /branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProvider...

noreply at shibboleth.net noreply at shibboleth.net
Wed Mar 20 21:53:50 EDT 2013


Author: putmanb
Date: Wed Mar 20 21:53:49 2013
New Revision: 1634

URL: http://svn.shibboleth.net/view/java-opensaml2?rev=1634&view=rev
Log:
Additional test logic for JOST-206.

Modified:
    branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java

Modified: branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java
URL: http://svn.shibboleth.net/view/java-opensaml2/branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java?rev=1634&r1=1633&r2=1634&view=diff
==============================================================================
--- branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java (original)
+++ branches/REL_2/src/test/java/org/opensaml/saml2/metadata/provider/FilesystemMetadataProviderTest.java Wed Mar 20 21:53:49 2013
@@ -201,6 +201,15 @@
             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 {
+            assertNull(metadataProvider.getMetadata());
+            EntityDescriptor entity = metadataProvider.getEntityDescriptor(entityID);
+            assertNull("Retrieved entity descriptor was not null", entity); 
+        } catch (MetadataProviderException e) {
+            fail("Metadata provider failed 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