Class FileBackedHTTPMetadataResolverTest

    • Field Detail

      • metadataURLHttps

        private String metadataURLHttps
      • metadataURLHttp

        private String metadataURLHttp
      • relativeMDResource

        private String relativeMDResource
      • relativeMDResourceExpired

        private String relativeMDResourceExpired
      • relativeMDResourceBad

        private String relativeMDResourceBad
      • badMDURL

        private String badMDURL
      • backupFilePath

        private String backupFilePath
      • backupFile

        private File backupFile
      • entityID

        private String entityID
    • Constructor Detail

      • FileBackedHTTPMetadataResolverTest

        public FileBackedHTTPMetadataResolverTest()
    • Method Detail

      • testGetEntityDescriptor

        public void testGetEntityDescriptor()
                                     throws Exception
        Tests the basic success case.
        Throws:
        Exception - ...
      • testFailFastBadURL

        public void testFailFastBadURL()
                                throws Exception
        Test fail-fast = true with known bad metadata URL.
        Throws:
        Exception - if something goes wrong
      • testNoFailFastBadURL

        public void testNoFailFastBadURL()
                                  throws Exception
        Test fail-fast = false with known bad metadata URL.
        Throws:
        Exception - if something goes wrong
      • testFailFastBadBackupFile

        public void testFailFastBadBackupFile()
                                       throws Exception
        Test fail-fast = true and bad backup file
        Throws:
        Exception - if something goes wrong
      • testNoFailFastBadBackupFile

        public void testNoFailFastBadBackupFile()
                                         throws Exception
        Test case of fail-fast = false and bad backup file
        Throws:
        Exception - if something goes wrong
      • testInitFromBackupFile

        public void testInitFromBackupFile()
                                    throws Exception
        Tests initialization from backup file, followed shortly by real refresh via HTTP.
        Throws:
        Exception - if something goes wrong
      • testInitFromExpiredBackupFile

        public void testInitFromExpiredBackupFile()
                                           throws Exception
        Tests initialization from backup file, followed shortly by real refresh via HTTP, for the special case of a backup file that is already expired. See OSJ-261. Issue there was the backupFileInitNextRefreshDelay wasn't being honored.
        Throws:
        Exception - if something goes wrong
      • testInitFromBadBackupFileNonFailFast

        public void testInitFromBadBackupFileNonFailFast()
                                                  throws Exception
        Tests initialization from backup file, followed shortly by real refresh via HTTP, for the special case of a backup file that throws during processing when fail-fast=false. See OSJ-261. Issue there was the backupFileInitNextRefreshDelay wasn't being honored.
        Throws:
        Exception - if something goes wrong
      • testNoBackupFileLoadWhenMetadataCached

        public void testNoBackupFileLoadWhenMetadataCached()
                                                    throws Exception
        Tests that backup file is not loaded on a refresh when already have cached metadata.
        Throws:
        Exception - if something goes wrong
      • testTrustEngineSocketFactoryNoHTTPSNoTrustEngine

        public void testTrustEngineSocketFactoryNoHTTPSNoTrustEngine()
                                                              throws Exception
        Throws:
        Exception
      • testTrustEngineSocketFactoryNoHTTPSWithTrustEngine

        public void testTrustEngineSocketFactoryNoHTTPSWithTrustEngine()
                                                                throws Exception
        Throws:
        Exception
      • testHTTPSNoTrustEngine

        public void testHTTPSNoTrustEngine()
                                    throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineExplicitKey

        public void testHTTPSTrustEngineExplicitKey()
                                             throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineInvalidKey

        public void testHTTPSTrustEngineInvalidKey()
                                            throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineValidPKIX

        public void testHTTPSTrustEngineValidPKIX()
                                           throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineValidPKIXExplicitName

        public void testHTTPSTrustEngineValidPKIXExplicitName()
                                                       throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineInvalidPKIX

        public void testHTTPSTrustEngineInvalidPKIX()
                                             throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineValidPKIXInvalidName

        public void testHTTPSTrustEngineValidPKIXInvalidName()
                                                      throws Exception
        Throws:
        Exception
      • testHTTPSTrustEngineWrongSocketFactory

        public void testHTTPSTrustEngineWrongSocketFactory()
                                                    throws Exception
        Throws:
        Exception