Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-5174

KeyStoresTestCase wrongly rounds days which leads to a failure in case of different daylight saving time

    XMLWordPrintable

Details

    Description

      Tests run: 29, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 12.721 s <<< FAILURE! - in org.wildfly.extension.elytron.KeyStoresTestCase
      testGenerateKeyPair(org.wildfly.extension.elytron.KeyStoresTestCase)  Time elapsed: 0.31 s  <<< FAILURE!
      java.lang.AssertionError: expected:<365> but was:<364>
      	at org.wildfly.extension.elytron.KeyStoresTestCase.testGenerateKeyPair(KeyStoresTestCase.java:559)
      

      KeyStoresTestCase wrongly rounds days which leads to a failure in case of different daylight saving time between the creation and expiration of a testing certificate, see https://github.com/wildfly/wildfly-core/blob/master/elytron/src/test/java/org/wildfly/extension/elytron/KeyStoresTestCase.java#L559

                  Date notBefore = certificate.getNotBefore();
                  Date notAfter = certificate.getNotAfter();
                  assertEquals(365, (notAfter.getTime() - notBefore.getTime()) / (1000 * 60 * 60 * 24));
      

      Attachments

        Issue Links

          Activity

            People

              darran.lofthouse@redhat.com Darran Lofthouse
              istudens@redhat.com Ivo Studensky
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: