isis-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladimir Nišević <vnise...@gmail.com>
Subject How to use alternative in memory database for Integration/Cucumber tests
Date Mon, 14 May 2018 11:12:50 GMT
Dear Isis community, we have upgraded to Isis 1.16.2 and now we are forced
to use HSQL-DB as in-memory database.

Here the code from isis-core-runtime-1.16.2.jar which is responsible for
that


package org.apache.isis.core.runtime.headless;
...
public class IsisSystemBootstrapper {


private static IsisSystem setupSystem(final AppManifest2 appManifest2) {

    final IsisConfigurationForJdoIntegTests configuration = new
IsisConfigurationForJdoIntegTests();
    configuration.putDataNucleusProperty("javax.jdo.option.ConnectionURL","jdbc:hsqldb:mem:test-"
+ UUID.randomUUID().toString());
    final IsisSystem.Builder isftBuilder =
            new IsisSystem.Builder()
                    .withLoggingAt(org.apache.log4j.Level.INFO)
                    .with(appManifest2)
                    .with(configuration);

    IsisSystem isft = isftBuilder.build();
    isft.setUpSystem();

    // save both the system and the manifest
    // used to bootstrap the system onto thread-loca
    IsisSystem.set(isft);
    isftAppManifest.set(appManifest2);

    return isft;
}

Since we had in the past issues with HSQL-DB (sequences are sometimes
generated in PUBLIC scheme and not accessible from datanucleus persistence)
we have moved to H2 database, it seems to be more robust,

But since upgrade to 1.16.2 we are forced to use HSQLB in
Integration/Cucumber tests.

Any hints how to change this?

Regards,Vladimir

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message