private static Config Initialize(PostgresFixture fixture) { //need to make sure db is created before the tests start DbUtils.Initialize(fixture); var config = @" akka.persistence { publish-plugin-commands = on snapshot-store { plugin = ""akka.persistence.snapshot-store.postgresql"" postgresql { class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = snapshot_store schema-name = public auto-initialize = on connection-string = """ + DbUtils.ConnectionString + @""" sequential-access = on } } } akka.test.single-expect-default = 10s"; return(ConfigurationFactory.ParseString(config)); }
private static Config Initialize(PostgresFixture fixture) { //need to make sure db is created before the tests start DbUtils.Initialize(fixture); var config = @" akka.persistence { publish-plugin-commands = on journal { plugin = ""akka.persistence.journal.postgresql"" postgresql { class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = event_journal schema-name = public auto-initialize = on connection-string = """ + DbUtils.ConnectionString + @""" use-bigint-identity-for-ordering-column = on } } } akka.test.single-expect-default = 10s"; return(ConfigurationFactory.ParseString(config)); }
static PostgreSqlJournalSpec() { var connectionString = ConfigurationManager.ConnectionStrings["TestDb"].ConnectionString; var config = @" akka.persistence { publish-plugin-commands = on journal { plugin = ""akka.persistence.journal.postgresql"" postgresql { class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = event_journal schema-name = public auto-initialize = on connection-string = """ + connectionString + @""" } } }"; SpecConfig = ConfigurationFactory.ParseString(config); //need to make sure db is created before the tests start DbUtils.Initialize(); }
static PostgreSqlJournalQuerySpec() { var specString = @" akka.persistence { publish-plugin-commands = on journal { plugin = ""akka.persistence.journal.postgresql"" postgresql { class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = event_journal auto-initialize = on connection-string-name = ""TestDb"" } } } " + TimestampConfig("akka.persistence.journal.postgresql"); SpecConfig = ConfigurationFactory.ParseString(specString); //need to make sure db is created before the tests start DbUtils.Initialize(); }
static PostgreSqlSnapshotStoreSpec() { var config = @" akka.persistence { publish-plugin-commands = on snapshot-store { plugin = ""akka.persistence.snapshot-store.postgresql"" postgresql { class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = snapshot_store schema-name = public auto-initialize = on connection-string-name = ""TestDb"" } } }"; SpecConfig = ConfigurationFactory.ParseString(config); //need to make sure db is created before the tests start DbUtils.Initialize(); }