Skip to content

Commit

Permalink
Merge pull request #80 from Arkatufus/Fix_Missing_stored-as_key_in_HOCON
Browse files Browse the repository at this point in the history
Add missing stored-as key to akka.persistence.snapshot-store.postgresql HOCON config
  • Loading branch information
Arkatufus authored Mar 5, 2021
2 parents 71c4389 + 7276967 commit 29652a2
Show file tree
Hide file tree
Showing 18 changed files with 34 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -35,7 +35,8 @@ class = ""Akka.Persistence.PostgreSql.Snapshot.PostgreSqlSnapshotStore, Akka.Per
stored-as = ""JSONB""
}
}
}");
}
akka.test.single-expect-default = 10s");
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {{
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {{
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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""
Expand All @@ -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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ class = ""Akka.Persistence.PostgreSql.Journal.PostgreSqlJournal, Akka.Persistenc
connection-string = """ + DbUtils.ConnectionString + @"""
}
}
}");
}
akka.test.single-expect-default = 10s");
}
}
}
3 changes: 3 additions & 0 deletions src/Akka.Persistence.PostgreSql/postgresql.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 29652a2

Please sign in to comment.