cancel
Showing results for 
Search instead for 
Did you mean: 

Disable TEST_STEP_RUN_HISTORY

SOLVED
Highlighted
Occasional Contributor

Disable TEST_STEP_RUN_HISTORY

I'm seeing lots of log messages when I run integration-tests with ready-api maven plugin v 1.4.1. How can I disable this built-in feature of readyapi as it doesn't seem to work?

 

13:19:53,537 ERROR [AbstractTestCaseRunner] Error notifying listener after step
org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL []; Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:
INSERT INTO test_step_run_history (TEST_STEP_ID, NAME, EXECUTION_ID, TEST_CASE_ID, STATUS, ENVIRONMENT, REQUEST_SIZE, REQUEST_CONTENT, RESPONSE_SIZE, RESPONSE_CONTENT, STARTED, DURATION, TEST_CASE_NAME, TEST_SUITE_NAME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [50200-176]; nested exception is org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:
INSERT INTO test_step_run_history (TEST_STEP_ID, NAME, EXECUTION_ID, TEST_CASE_ID, STATUS, ENVIRONMENT, REQUEST_SIZE, REQUEST_CONTENT, RESPONSE_SIZE, RESPONSE_CONTENT, STARTED, DURATION, TEST_CASE_NAME, TEST_SUITE_NAME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [50200-176]
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:259)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:660)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:943)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.executeInsertAndReturnKeyHolderInternal(AbstractJdbcInsert.java:436)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.executeInsertAndReturnKeyInternal(AbstractJdbcInsert.java:417)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.doExecuteAndReturnKey(AbstractJdbcInsert.java:386)
	at org.springframework.jdbc.core.simple.SimpleJdbcInsert.executeAndReturnKey(SimpleJdbcInsert.java:137)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.internalAdd(JdbcTestStepRunHistoryEntryRepository.java:258)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.access$3(JdbcTestStepRunHistoryEntryRepository.java:236)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$1.doInTransaction(JdbcTestStepRunHistoryEntryRepository.java:166)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$1.doInTransaction(JdbcTestStepRunHistoryEntryRepository.java:1)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.addWithLimit(JdbcTestStepRunHistoryEntryRepository.java:163)
	at com.eviware.soapui.impl.wsdl.history.LatestTestRunsDataCollector.afterStep(LatestTestRunsDataCollector.java:79)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyListenersAfterStep(AbstractTestCaseRunner.java:254)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:232)
	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:145)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:
INSERT INTO test_step_run_history (TEST_STEP_ID, NAME, EXECUTION_ID, TEST_CASE_ID, STATUS, ENVIRONMENT, REQUEST_SIZE, REQUEST_CONTENT, RESPONSE_SIZE, RESPONSE_CONTENT, STARTED, DURATION, TEST_CASE_NAME, TEST_SUITE_NAME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [50200-176]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:344)
	at org.h2.message.DbException.get(DbException.java:178)
	at org.h2.message.DbException.get(DbException.java:154)
	at org.h2.table.RegularTable.doLock(RegularTable.java:530)
	at org.h2.table.RegularTable.lock(RegularTable.java:464)
	at org.h2.command.dml.Insert.insertRows(Insert.java:155)
	at org.h2.command.dml.Insert.update(Insert.java:115)
	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
	at org.h2.command.Command.executeUpdate(Command.java:254)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:158)
	at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:144)
	at org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:946)
	at org.springframework.jdbc.core.JdbcTemplate$3.doInPreparedStatement(JdbcTemplate.java:943)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:644)
	... 23 more

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: Disable TEST_STEP_RUN_HISTORY

There are additional 3 lines in property file, just keep the property only(remove the decoration) and try with testrunner.sh to see you achieve what is needed. And got no clue about maven.



Regards,
Rao.

View solution in original post

4 REPLIES 4
Community Hero

Re: Disable TEST_STEP_RUN_HISTORY

Here are the steps to disable history:

 

  1. Create a file called system.properties with the following single line:

        test.history.disabled=true

  2. Put in the directory .readyapi, which you'll find in your home folder (e.g. C:\Users\<your_user_name> on Windows)

  3. Restart Ready! API

Here is the original thread for more details, courtsey @MFagerlind



Regards,
Rao.
Occasional Contributor

Re: Disable TEST_STEP_RUN_HISTORY

I set the option as advised, printing the content of the file in a pre-build step in jenkins:

 

+ more /var/jenkins_home/.readyapi/system.properties
::::::::::::::
/var/jenkins_home/.readyapi/system.properties
::::::::::::::
test.history.disabled=true

 

Unfortunately, this doesn't prevent the messages from being added to the log: 

org.springframework.dao.CannotAcquireLockException: PreparedStatementCallback; SQL []; Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:
INSERT INTO test_step_run_history (TEST_STEP_ID, NAME, EXECUTION_ID, TEST_CASE_ID, STATUS, ENVIRONMENT, REQUEST_SIZE, REQUEST_CONTENT, RESPONSE_SIZE, RESPONSE_CONTENT, STARTED, DURATION, TEST_CASE_NAME, TEST_SUITE_NAME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [50200-176]; nested exception is org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:
INSERT INTO test_step_run_history (TEST_STEP_ID, NAME, EXECUTION_ID, TEST_CASE_ID, STATUS, ENVIRONMENT, REQUEST_SIZE, REQUEST_CONTENT, RESPONSE_SIZE, RESPONSE_CONTENT, STARTED, DURATION, TEST_CASE_NAME, TEST_SUITE_NAME) VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [50200-176]
	at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:259)
	at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73)
	at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:660)
	at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:943)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.executeInsertAndReturnKeyHolderInternal(AbstractJdbcInsert.java:436)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.executeInsertAndReturnKeyInternal(AbstractJdbcInsert.java:417)
	at org.springframework.jdbc.core.simple.AbstractJdbcInsert.doExecuteAndReturnKey(AbstractJdbcInsert.java:386)
	at org.springframework.jdbc.core.simple.SimpleJdbcInsert.executeAndReturnKey(SimpleJdbcInsert.java:137)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.internalAdd(JdbcTestStepRunHistoryEntryRepository.java:258)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.access$3(JdbcTestStepRunHistoryEntryRepository.java:236)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$1.doInTransaction(JdbcTestStepRunHistoryEntryRepository.java:166)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository$1.doInTransaction(JdbcTestStepRunHistoryEntryRepository.java:1)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:133)
	at com.smartbear.ready.db.repository.jdbc.JdbcTestStepRunHistoryEntryRepository.addWithLimit(JdbcTestStepRunHistoryEntryRepository.java:163)
	at com.eviware.soapui.impl.wsdl.history.LatestTestRunsDataCollector.afterStep(LatestTestRunsDataCollector.java:79)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.notifyListenersAfterStep(AbstractTestCaseRunner.java:254)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:232)
	at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:47)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:145)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:1)
	at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:130)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.h2.jdbc.JdbcSQLException: Timeout trying to lock table "TEST_STEP_RUN_HISTORY"; SQL statement:

 

Please note there is no local ready-api installation present on this jenkins slave, we're using ready-api maven-plugin. Maybe there's an option to pass in pom.xml? Or is there anything else I can try to get rid of the messages (around 300 per job)? 

Community Hero

Re: Disable TEST_STEP_RUN_HISTORY

There are additional 3 lines in property file, just keep the property only(remove the decoration) and try with testrunner.sh to see you achieve what is needed. And got no clue about maven.



Regards,
Rao.

View solution in original post

Occasional Contributor

Re: Disable TEST_STEP_RUN_HISTORY

Oh no, there is no decoration in the file itself, that's just the way of printing the content of a file. 

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors