Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-3594

Unit tests failing when running automated tests with PostGres. This prevents integration tests from running.

    XMLWordPrintable

    Details

    • Attachments:
      0
    • Comments:
      6
    • Documentation Status:
      Needed

      Description

      There errors make it more difficult to test with an actual database.Note also, the tests only work within an empty postgres database. More errors are thrown if the database is not cleaned between runs.
      -------------------------------------------------------
      {{ T E S T S}}
      -------------------------------------------------------
      Running org.dspace.checker.dao.impl.ChecksumHistoryDAOImplTest
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 12.096 sec <<< FAILURE! - in org.dspace.checker.dao.impl.ChecksumHistoryDAOImplTest
      testDeleteByDateAndCode(org.dspace.checker.dao.impl.ChecksumHistoryDAOImplTest) Time elapsed: 0.127 sec <<< ERROR!
      org.hibernate.exception.SQLGrammarException: could not execute statement
      {{ at org.dspace.checker.dao.impl.ChecksumHistoryDAOImplTest.testDeleteByDateAndCode(ChecksumHistoryDAOImplTest.java:101)}}
      {{Caused by: org.postgresql.util.PSQLException: }}
      ERROR: column "bitstream_id" is of type uuid but expression is of type character varying
      {{ Hint: You will need to rewrite or cast the expression.}}
      {{ Position: 100}}
      {{ at org.dspace.checker.dao.impl.ChecksumHistoryDAOImplTest.testDeleteByDateAndCode(ChecksumHistoryDAOImplTest.java:101)}}Running org.dspace.content.SupervisedItemTest
      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.526 sec - in org.dspace.content.SupervisedItemTest
      Running org.dspace.content.BitstreamFormatTest
      Tests run: 30, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.978 sec - in org.dspace.content.BitstreamFormatTest
      Running org.dspace.content.VersioningTest
      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.562 sec - in org.dspace.content.VersioningTest
      Running org.dspace.content.BitstreamTest
      Tests run: 39, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.073 sec - in org.dspace.content.BitstreamTest
      Running org.dspace.content.comparator.NameAscendingComparatorTest
      Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.174 sec - in org.dspace.content.comparator.NameAscendingComparatorTest
      Running org.dspace.content.CommunityTest
      Tests run: 68, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.196 sec - in org.dspace.content.CommunityTest
      Running org.dspace.content.DCSeriesNumberTest
      Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.03 sec - in org.dspace.content.DCSeriesNumberTest
      Running org.dspace.content.BundleTest
      Tests run: 36, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.817 sec - in org.dspace.content.BundleTest
      Running org.dspace.content.LicenseUtilsTest
      Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.055 sec - in org.dspace.content.LicenseUtilsTest
      Running org.dspace.content.CollectionTest
      Tests run: 97, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 10.285 sec - in org.dspace.content.CollectionTest
      Running org.dspace.content.authority.DSpaceControlledVocabularyTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.473 sec - in org.dspace.content.authority.DSpaceControlledVocabularyTest
      Running org.dspace.content.DCPersonNameTest
      Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.02 sec - in org.dspace.content.DCPersonNameTest
      Running org.dspace.content.MetadataValueTest
      Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.451 sec - in org.dspace.content.MetadataValueTest
      Running org.dspace.content.SiteTest
      Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.95 sec - in org.dspace.content.SiteTest
      Running org.dspace.content.InstallItemTest
      Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.097 sec - in org.dspace.content.InstallItemTest
      Running org.dspace.content.packager.PackageUtilsTest
      Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.015 sec - in org.dspace.content.packager.PackageUtilsTest
      Running org.dspace.content.DCLanguageTest
      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.043 sec - in org.dspace.content.DCLanguageTest
      Running org.dspace.content.MetadataFieldTest
      Tests run: 21, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.407 sec - in org.dspace.content.MetadataFieldTest
      Running org.dspace.content.FormatIdentifierTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.986 sec - in org.dspace.content.FormatIdentifierTest
      Running org.dspace.content.DCDateTest
      Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.054 sec - in org.dspace.content.DCDateTest
      Running org.dspace.content.ItemComparatorTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.48 sec - in org.dspace.content.ItemComparatorTest
      Running org.dspace.content.MetadataSchemaTest
      Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.303 sec - in org.dspace.content.MetadataSchemaTest
      Running org.dspace.content.ThumbnailTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.995 sec - in org.dspace.content.ThumbnailTest
      Running org.dspace.content.ItemTest
      Tests run: 85, Failures: 0, Errors: 2, Skipped: 0, Time elapsed: 11.031 sec <<< FAILURE! - in org.dspace.content.ItemTest
      testSetOwningCollection(org.dspace.content.ItemTest) Time elapsed: 0.022 sec <<< ERROR!
      org.hibernate.exception.ConstraintViolationException: could not execute batch
      {{ at org.dspace.content.ItemTest.init(ItemTest.java:77)}}
      {{Caused by: java.sql.BatchUpdateException: }}
      Batch entry 0 update public.handle set resource_id='358b1b0a-494b-4b17-8f48-e3c86e96ff84'::uuid, handle='123456789/567', resource_type_id=3 where handle_id=575 was aborted: ERROR: duplicate key value violates unique constraint "handle_handle_key"
      {{ Detail: Key (handle)=(123456789/567) already exists. Call getNextException to see other errors in the batch.}}
      {{ at org.dspace.content.ItemTest.init(ItemTest.java:77)}}
      {{Caused by: org.postgresql.util.PSQLException: }}
      ERROR: duplicate key value violates unique constraint "handle_handle_key"
      {{ Detail: Key (handle)=(123456789/567) already exists.}}
      {{ at org.dspace.content.ItemTest.init(ItemTest.java:77)}}testSetOwningCollection(org.dspace.content.ItemTest) Time elapsed: 0.023 sec <<< ERROR!
      org.hibernate.exception.GenericJDBCException: could not execute batch
      {{ at org.dspace.content.ItemTest.destroy(ItemTest.java:123)}}
      Caused by: java.sql.BatchUpdateException: Batch entry 0 update public.handle set resource_id='358b1b0a-494b-4b17-8f48-e3c86e96ff84'::uuid, handle='123456789/567', resource_type_id=3 where handle_id=575 was aborted: ERROR: current transaction is aborted, commands ignored until end of transaction block Call getNextException to see other errors in the batch.
      {{ at org.dspace.content.ItemTest.destroy(ItemTest.java:123)}}
      Caused by: org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction block
      {{ at org.dspace.content.ItemTest.destroy(ItemTest.java:123)}}
      {{Caused by: org.postgresql.util.PSQLException: }}
      ERROR: duplicate key value violates unique constraint "handle_handle_key"
      {{ Detail: Key (handle)=(123456789/567) already exists.}}
      {{ at org.dspace.content.ItemTest.init(ItemTest.java:77)}}Running org.dspace.content.WorkspaceItemTest
      Tests run: 26, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.512 sec - in org.dspace.content.WorkspaceItemTest
      Running org.dspace.content.InProgressSubmissionTest
      Tests run: 12, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.806 sec - in org.dspace.content.InProgressSubmissionTest
      Running org.dspace.content.NonUniqueMetadataExceptionTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.034 sec - in org.dspace.content.NonUniqueMetadataExceptionTest
      Running org.dspace.authenticate.IPMatcherTest
      Tests run: 24, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.78 sec - in org.dspace.authenticate.IPMatcherTest
      Running org.dspace.util.MultiFormatDateParserTest
      Tests run: 23, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.024 sec - in org.dspace.util.MultiFormatDateParserTest
      Running org.dspace.identifier.HandleIdentifierProviderTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.381 sec - in org.dspace.identifier.HandleIdentifierProviderTest
      Running org.dspace.identifier.EZIDIdentifierProviderTest
      Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.219 sec - in org.dspace.identifier.EZIDIdentifierProviderTest
      Running org.dspace.identifier.DOIIdentifierProviderTest
      Tests run: 19, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.466 sec - in org.dspace.identifier.DOIIdentifierProviderTest
      Running org.dspace.discovery.FullTextContentStreamsTest
      Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.149 sec - in org.dspace.discovery.FullTextContentStreamsTest
      Running org.dspace.statistics.util.SpiderDetectorServiceImplTest
      Tests run: 10, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.514 sec - in org.dspace.statistics.util.SpiderDetectorServiceImplTest
      Running org.dspace.statistics.util.TestLocationUtils
      Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.394 sec - in org.dspace.statistics.util.TestLocationUtils
      Running org.dspace.eperson.EPersonTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.921 sec - in org.dspace.eperson.EPersonTest
      Running org.dspace.eperson.PasswordHashTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.469 sec - in org.dspace.eperson.PasswordHashTest
      Running org.dspace.eperson.GroupTest
      Tests run: 25, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 2.143 sec <<< FAILURE! - in org.dspace.eperson.GroupTest
      findAllNameSort(org.dspace.eperson.GroupTest) Time elapsed: 0.039 sec <<< ERROR!
      java.lang.NullPointerException
      {{ at org.dspace.eperson.GroupTest.findAllNameSort(GroupTest.java:214)}}Running org.dspace.core.PathsClassLoaderTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.085 sec - in org.dspace.core.PathsClassLoaderTest
      Running org.dspace.core.ContextTest
      Tests run: 17, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.01 sec - in org.dspace.core.ContextTest
      Running org.dspace.core.ContextReadOnlyCacheTest
      Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.071 sec - in org.dspace.core.ContextReadOnlyCacheTest
      Running org.dspace.core.PluginServiceTest
      Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.358 sec - in org.dspace.core.PluginServiceTest
      Running org.dspace.core.I18nUtilTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.487 sec - in org.dspace.core.I18nUtilTest
      Running org.dspace.app.mediafilter.PoiWordFilterTest
      Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.668 sec - in org.dspace.app.mediafilter.PoiWordFilterTest
      Running org.dspace.app.util.IndexVersionTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.003 sec - in org.dspace.app.util.IndexVersionTest
      Running org.dspace.app.bulkedit.DSpaceCSVTest
      Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.825 sec - in org.dspace.app.bulkedit.DSpaceCSVTestResults :{{Tests in error: }}
      {{ ChecksumHistoryDAOImplTest.testDeleteByDateAndCode:101 » SQLGrammar could not ...}}
      org.dspace.content.ItemTest.testSetOwningCollection(org.dspace.content.ItemTest)
      {{ Run 1: ItemTest.init:77 » ConstraintViolation could not execute batch}}
      {{ Run 2: ItemTest.destroy:123->AbstractDSpaceObjectTest.destroy:67->AbstractUnitTest.destroy:159->AbstractUnitTest.cleanupContext:172 » GenericJDBC}}

        Attachments

          Activity

            People

            • Assignee:
              terrywbrady Terry Brady
              Reporter:
              terrywbrady Terry Brady
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: