diff --git a/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlJournalJsonSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlJournalJsonSpec.cs index 4e17779..74dc7d0 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlJournalJsonSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlJournalJsonSpec.cs @@ -21,7 +21,7 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString(@" - akka.persistence { + akka.persistence { publish-plugin-commands = on journal { plugin = ""akka.persistence.journal.postgresql"" @@ -35,7 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc stored-as = ""jsonb"" } } - }"); + } + akka.test.single-expect-default = 10s"); } // TODO: hack. Replace when https://github.com/akkadotnet/akka.net/issues/3811 diff --git a/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlSnapshotStoreJsonSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlSnapshotStoreJsonSpec.cs index ab8f9a1..b32a02c 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlSnapshotStoreJsonSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Json/PostgreSqlSnapshotStoreJsonSpec.cs @@ -21,7 +21,7 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString(@" - akka.persistence { + akka.persistence { publish-plugin-commands = on snapshot-store { plugin = ""akka.persistence.snapshot-store.postgresql"" @@ -35,7 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Per stored-as = ""JSONB"" } } - }"); + } + akka.test.single-expect-default = 10s"); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/Performance/PostgreSqlJournalPerfSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Performance/PostgreSqlJournalPerfSpec.cs index 5305561..80c9825 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Performance/PostgreSqlJournalPerfSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Performance/PostgreSqlJournalPerfSpec.cs @@ -29,14 +29,13 @@ private static Config CreateSpecConfig(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString(@" - akka.loglevel = INFO akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql { class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" auto-initialize = on connection-string = """ + DbUtils.ConnectionString + @""" } - akka.test.single-expect-default = 3s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalConnectionFailureSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalConnectionFailureSpec.cs index 5cf7389..303f6a2 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalConnectionFailureSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalConnectionFailureSpec.cs @@ -35,7 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = """ + connectionString + @""" } } - }"; + } + akka.test.single-expect-default = 10s"; return ConfigurationFactory.ParseString(config); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalSpec.cs index bb87fa0..8e56bb4 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlJournalSpec.cs @@ -34,7 +34,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = """ + DbUtils.ConnectionString + @""" } } - }"; + } + akka.test.single-expect-default = 10s"; return ConfigurationFactory.ParseString(config); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreConnectionFailureSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreConnectionFailureSpec.cs index 9d991dd..290c6dd 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreConnectionFailureSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreConnectionFailureSpec.cs @@ -37,7 +37,8 @@ class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Per connection-string = """ + connectionString + @""" } } - }"; + } + akka.test.single-expect-default = 10s"; return ConfigurationFactory.ParseString(config); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreSpec.cs index 93486ec..995cebf 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/PostgreSqlSnapshotStoreSpec.cs @@ -35,7 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Per connection-string = """ + DbUtils.ConnectionString + @""" } } - }"; + } + akka.test.single-expect-default = 10s"; return ConfigurationFactory.ParseString(config); } diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlAllEventsSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlAllEventsSpec.cs index ef6b2e1..f8b6795 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlAllEventsSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlAllEventsSpec.cs @@ -23,8 +23,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO - akka.test.single-expect-default = 10s akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" @@ -34,7 +32,7 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentAllEventsSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentAllEventsSpec.cs index a7c7102..3a8c47c 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentAllEventsSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentAllEventsSpec.cs @@ -23,8 +23,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO - akka.test.single-expect-default = 10s akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" @@ -34,7 +32,7 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByPersistenceIdSpec.cs index b635fe4..7713c44 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByPersistenceIdSpec.cs @@ -23,17 +23,16 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.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 = """ + DbUtils.ConnectionString + @""" + connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByTagSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByTagSpec.cs index ddede9e..04ee33a 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByTagSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentEventsByTagSpec.cs @@ -26,7 +26,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ event-adapters {{ @@ -39,10 +38,10 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc plugin-dispatcher = ""akka.actor.default-dispatcher"" table-name = event_journal auto-initialize = on - connection-string = """ + DbUtils.ConnectionString + @""" + connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentPersistenceIdsSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentPersistenceIdsSpec.cs index 7884a9e..14468b1 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlCurrentPersistenceIdsSpec.cs @@ -23,8 +23,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO - akka.test.single-expect-default = 10s akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" @@ -34,7 +32,7 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByPersistenceIdSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByPersistenceIdSpec.cs index ed58d4d..e510cbf 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByPersistenceIdSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByPersistenceIdSpec.cs @@ -23,17 +23,16 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.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 = """ + DbUtils.ConnectionString + @""" + connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByTagSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByTagSpec.cs index 2750409..e0c0ac1 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByTagSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlEventsByTagSpec.cs @@ -23,7 +23,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ event-adapters {{ @@ -34,12 +33,11 @@ private static Config Initialize(PostgresFixture fixture) }} class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" plugin-dispatcher = ""akka.actor.default-dispatcher"" - table-name = event_journal auto-initialize = on - connection-string = """ + DbUtils.ConnectionString + @""" + connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlPersistenceIdsSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlPersistenceIdsSpec.cs index e2ddb1d..6d20ad0 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlPersistenceIdsSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Query/PostgreSqlPersistenceIdsSpec.cs @@ -23,8 +23,6 @@ private static Config Initialize(PostgresFixture fixture) DbUtils.Initialize(fixture); return ConfigurationFactory.ParseString($@" - akka.loglevel = INFO - akka.test.single-expect-default = 10s akka.persistence.journal.plugin = ""akka.persistence.journal.postgresql"" akka.persistence.journal.postgresql {{ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistence.PostgreSql"" @@ -34,7 +32,7 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = ""{DbUtils.ConnectionString}"" refresh-interval = 1s }} - akka.test.single-expect-default = 15s") + akka.test.single-expect-default = 10s") .WithFallback(PostgreSqlPersistence.DefaultConfiguration()) .WithFallback(SqlReadJournal.DefaultConfiguration()) .WithFallback(Persistence.DefaultConfig()); diff --git a/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlJournalSerializationSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlJournalSerializationSpec.cs index 1742f22..478e4e8 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlJournalSerializationSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlJournalSerializationSpec.cs @@ -39,7 +39,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = """ + DbUtils.ConnectionString + @""" } } - }"); + } + akka.test.single-expect-default = 10s"); } [Fact(Skip = "Sql plugin does not support EventAdapter.Manifest")] diff --git a/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlSnapshotStoreSerializationSpec.cs b/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlSnapshotStoreSerializationSpec.cs index c69deb8..b7d03b5 100644 --- a/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlSnapshotStoreSerializationSpec.cs +++ b/src/Akka.Persistence.PostgreSql.Tests/Serialization/PostgreSqlSnapshotStoreSerializationSpec.cs @@ -39,7 +39,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc connection-string = """ + DbUtils.ConnectionString + @""" } } - }"); + } + akka.test.single-expect-default = 10s"); } } } diff --git a/src/Akka.Persistence.PostgreSql/postgresql.conf b/src/Akka.Persistence.PostgreSql/postgresql.conf index dde4435..b9a608a 100644 --- a/src/Akka.Persistence.PostgreSql/postgresql.conf +++ b/src/Akka.Persistence.PostgreSql/postgresql.conf @@ -66,6 +66,9 @@ # should corresponding journal table be initialized automatically auto-initialize = off + # Postgres data type for payload column. Allowed options: bytea, json, jsonb + stored-as = bytea + # Setting used to toggle sequential read access when loading large objects # from journals and snapshot stores. sequential-access = off