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

WorkspaceItemTest fails (Timeout trying to lock table "EPERSON")

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0
    • Fix Version/s: None
    • Component/s: Unit Testing Framework
    • Environment:
    • Attachments:
      1
    • Comments:
      9

      Description

      I ran "mvn clean package license:check -Dmaven.test.skip=false" and 25 tests failed with the following message, 2 seconds apart:

      2012-12-02 23:40:08,149 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=197,handle=123456789/423
      2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::update_item:item_id=318
      2012-12-02 23:40:08,149 INFO org.dspace.content.Item @ test@email.com::create_item:item_id=318
      2012-12-02 23:40:10,151 ERROR org.dspace.content.WorkspaceItemTest @ SQL Error in init
      org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "EPERSON"; SQL statement:
      update RESOURCEPOLICY set START_DATE = ?, RPDESCRIPTION = ?, RESOURCE_TYPE_ID = ?, EPERSONGROUP_ID = ?, END_DATE = ?, EPERSON_ID = ?, RPTYPE = ?, RESOURCE_ID = ?, ACTION_ID = ?, RPNAME = ? where POLICY_ID = ? [50200-137]
      at org.h2.message.DbException.getJdbcSQLException(DbException.java:327)
      at org.h2.message.DbException.get(DbException.java:167)
      at org.h2.message.DbException.get(DbException.java:144)
      at org.h2.table.RegularTable.doLock(RegularTable.java:466)
      at org.h2.table.RegularTable.lock(RegularTable.java:404)
      at org.h2.constraint.ConstraintReferential.existsRow(ConstraintReferential.java:336)
      at org.h2.constraint.ConstraintReferential.checkRowOwnTable(ConstraintReferential.java:328)
      at org.h2.constraint.ConstraintReferential.checkRow(ConstraintReferential.java:271)
      at org.h2.table.Table.fireConstraints(Table.java:797)
      at org.h2.table.Table.fireAfterRow(Table.java:814)
      at org.h2.command.dml.Update.update(Update.java:130)
      at org.h2.command.CommandContainer.update(CommandContainer.java:70)
      at org.h2.command.Command.executeUpdate(Command.java:199)
      at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:141)
      at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:127)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      at org.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:105)
      at org.dspace.storage.rdbms.MockDatabaseManager.executeUpdate(MockDatabaseManager.java:1397)
      at org.dspace.storage.rdbms.MockDatabaseManager.update(MockDatabaseManager.java:803)
      at org.dspace.storage.rdbms.DatabaseManager.update(DatabaseManager.java)
      at org.dspace.authorize.ResourcePolicy.update(ResourcePolicy.java:478)
      at org.dspace.authorize.AuthorizeManager.addPolicy(AuthorizeManager.java:481)
      at org.dspace.content.WorkspaceItem.create(WorkspaceItem.java:157)
      at org.dspace.content.WorkspaceItemTest.init(WorkspaceItemTest.java:56)
      at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
      at mockit.integration.junit4.internal.BlockJUnit4ClassRunnerDecorator.invokeExplosively(BlockJUnit4ClassRunnerDecorator.java:83)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
      at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)
      at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:120)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:103)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:169)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)
      2012-12-02 23:40:10,160 INFO org.dspace.content.Collection @ test@email.com::create_collection:collection_id=198,handle=12

      See the surefire reports attached.

      First time this happened to me was here:
      https://github.com/DSpace/DSpace/pull/125

      and now again on DSpace 3.0 (5221f92ce49b3d052fa1d3e7decf1f9b12742df5).

      Both times I ran the build a second time (with no changes), it built just fine.

        Attachments

          Activity

            People

            • Assignee:
              tdonohue Tim Donohue
              Reporter:
              helix84 Ivan Masár
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: