<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Why h2 db is not cleaned between tests in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81955#M54898</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you remove a deployment, it cascades all related data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What data isn't removed? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eg. users and groups need manual removal in the teardown, because typically those are shared accross tests.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 22 Oct 2012 09:09:21 GMT</pubDate>
    <dc:creator>jbarrez</dc:creator>
    <dc:date>2012-10-22T09:09:21Z</dc:date>
    <item>
      <title>Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81954#M54897</link>
      <description>Hello everybody. &lt;IMG id="smileyvery-happy" class="emoticon emoticon-smileyvery-happy" src="https://migration33.stage.lithium.com/i/smilies/16x16_smiley-very-happy.png" alt="Smiley Very Happy" title="Smiley Very Happy" /&gt; It is the first time I post here, I hope you could help me. :mrgreen: Working on tests of my project built on engine API, as usual practice I built a big amount of unit test to take control of development. Each test works fine alone but not in a suite. :? I tried with some test f</description>
      <pubDate>Sun, 21 Oct 2012 12:55:56 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81954#M54897</guid>
      <dc:creator>albertorugnone1</dc:creator>
      <dc:date>2012-10-21T12:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81955#M54898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you remove a deployment, it cascades all related data.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What data isn't removed? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Eg. users and groups need manual removal in the teardown, because typically those are shared accross tests.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 09:09:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81955#M54898</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-22T09:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81956#M54899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;They seems data related to IdentityService and HistoricService&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Oct 2012 09:45:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81956#M54899</guid>
      <dc:creator>albertorugnone1</dc:creator>
      <dc:date>2012-10-22T09:45:16Z</dc:date>
    </item>
    <item>
      <title>Re: Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81957#M54900</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;History data should be removed when the deployment is removed. What data do you see?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Identity is normal: that is not related to processes and is not cleaned?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Oct 2012 07:33:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81957#M54900</guid>
      <dc:creator>jbarrez</dc:creator>
      <dc:date>2012-10-23T07:33:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81958#M54901</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not really sure what happened, maybe my poor expertise with db in mem. In any case I am preparing few maven projects too isolate all issue related to data in db. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The first issue is about h2 db creation.&amp;nbsp; You can find the project at &lt;/SPAN&gt;&lt;A href="https://www.dropbox.com/s/4fv3qefob1r7dnb/InitFailsTableAlreadyExist.zip" rel="nofollow noopener noreferrer"&gt;https://www.dropbox.com/s/4fv3qefob1r7dnb/InitFailsTableAlreadyExist.zip&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in this example the test initEngineStandaloneConfigurationInMemDbTest fails throwing &lt;/SPAN&gt;&lt;BR /&gt;&lt;CODE&gt;org.activiti.engine.ActivitiException: couldn't create db schema: create table ACT_HI_PROCINST ( &lt;BR /&gt;ID_ varchar(64) not null, &lt;BR /&gt;PROC_INST_ID_ varchar(64) not null, &lt;BR /&gt;BUSINESS_KEY_ varchar(255), &lt;BR /&gt;PROC_DEF_ID_ varchar(64) not null, &lt;BR /&gt;START_TIME_ timestamp not null, &lt;BR /&gt;END_TIME_ timestamp, &lt;BR /&gt;DURATION_ bigint, &lt;BR /&gt;START_USER_ID_ varchar(255), &lt;BR /&gt;START_ACT_ID_ varchar(255), &lt;BR /&gt;END_ACT_ID_ varchar(255), &lt;BR /&gt;SUPER_PROCESS_INSTANCE_ID_ varchar(64), &lt;BR /&gt;DELETE_REASON_ varchar(4000), &lt;BR /&gt;primary key (ID_), &lt;BR /&gt;unique (PROC_INST_ID_) &lt;BR /&gt;)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:828)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:755)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.executeMandatorySchemaResource(DbSqlSession.java:618)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCreateHistory(DbSqlSession.java:587)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCreate(DbSqlSession.java:574)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:881)&lt;BR /&gt; at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:42)&lt;BR /&gt; at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)&lt;BR /&gt; at org.activiti.engine.impl.ProcessEngineImpl.&amp;lt;init&amp;gt;(ProcessEngineImpl.java:77)&lt;BR /&gt; at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:283)&lt;BR /&gt; at it.ipiu.orch.ProcessManagementTest.testInitEngineConfigurationInMem(ProcessManagementTest.java:64)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&lt;BR /&gt; at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&lt;BR /&gt; at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&lt;BR /&gt; at java.lang.reflect.Method.invoke(Method.java:597)&lt;BR /&gt; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)&lt;BR /&gt; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)&lt;BR /&gt; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)&lt;BR /&gt; at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)&lt;BR /&gt; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)&lt;BR /&gt; at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)&lt;BR /&gt; at org.junit.rules.TestWatchman$1.evaluate(TestWatchman.java:48)&lt;BR /&gt; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)&lt;BR /&gt; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)&lt;BR /&gt; at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)&lt;BR /&gt; at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)&lt;BR /&gt; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)&lt;BR /&gt; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)&lt;BR /&gt; at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)&lt;BR /&gt; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)&lt;BR /&gt; at org.junit.runners.ParentRunner.run(ParentRunner.java:236)&lt;BR /&gt; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)&lt;BR /&gt; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)&lt;BR /&gt;Caused by: org.h2.jdbc.JdbcSQLException: Table "ACT_HI_PROCINST" already exists; SQL statement:&lt;BR /&gt;create table ACT_HI_PROCINST ( &lt;BR /&gt;ID_ varchar(64) not null, &lt;BR /&gt;PROC_INST_ID_ varchar(64) not null, &lt;BR /&gt;BUSINESS_KEY_ varchar(255), &lt;BR /&gt;PROC_DEF_ID_ varchar(64) not null, &lt;BR /&gt;START_TIME_ timestamp not null, &lt;BR /&gt;END_TIME_ timestamp, &lt;BR /&gt;DURATION_ bigint, &lt;BR /&gt;START_USER_ID_ varchar(255), &lt;BR /&gt;START_ACT_ID_ varchar(255), &lt;BR /&gt;END_ACT_ID_ varchar(255), &lt;BR /&gt;SUPER_PROCESS_INSTANCE_ID_ varchar(64), &lt;BR /&gt;DELETE_REASON_ varchar(4000), &lt;BR /&gt;primary key (ID_), &lt;BR /&gt;unique (PROC_INST_ID_) &lt;BR /&gt;) [42101-132]&lt;BR /&gt; at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)&lt;BR /&gt; at org.h2.message.DbException.get(DbException.java:167)&lt;BR /&gt; at org.h2.message.DbException.get(DbException.java:144)&lt;BR /&gt; at org.h2.command.ddl.CreateTable.update(CreateTable.java:106)&lt;BR /&gt; at org.h2.command.CommandContainer.update(CommandContainer.java:70)&lt;BR /&gt; at org.h2.command.Command.executeUpdate(Command.java:198)&lt;BR /&gt; at org.h2.jdbc.JdbcStatement.executeInternal(JdbcStatement.java:176)&lt;BR /&gt; at org.h2.jdbc.JdbcStatement.execute(JdbcStatement.java:151)&lt;BR /&gt; at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:802)&lt;BR /&gt; … 38 more&lt;BR /&gt;&lt;BR /&gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;SPAN&gt;Honestly I am looking for this project in the forum and in the documentation but without success. Maybe you can help me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Please forgive me if this issue is for real newbe&amp;nbsp; :mrgreen: and if I don't follow the best practice for activiti unit test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you and kind regards&amp;nbsp; :ugeek:&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 14:17:19 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81958#M54901</guid>
      <dc:creator>albertorugnone1</dc:creator>
      <dc:date>2012-10-24T14:17:19Z</dc:date>
    </item>
    <item>
      <title>Re: Why h2 db is not cleaned between tests</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81959#M54902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The in-memory database keeps it's data as long as the jvm is running… So if you get errors stating the table is already there, this means you're not asking activiti to drop the tables between tests&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Oct 2012 14:27:04 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/why-h2-db-is-not-cleaned-between-tests/m-p/81959#M54902</guid>
      <dc:creator>frederikherema1</dc:creator>
      <dc:date>2012-10-24T14:27:04Z</dc:date>
    </item>
  </channel>
</rss>

