pjfanning commented on code in PR #276:
URL: 
https://github.com/apache/pekko-persistence-jdbc/pull/276#discussion_r2008769643


##########
core/src/test/scala/org/apache/pekko/persistence/jdbc/state/scaladsl/DurableStateStorePluginSpec.scala:
##########
@@ -45,5 +54,90 @@ abstract class DurableStateStorePluginSpec(config: Config, 
profile: JdbcProfile)
   }
 }
 
+abstract class DurableStateStorePostgresSchemaPluginSpec(val config: Config, 
profile: JdbcProfile)
+    extends AnyWordSpecLike
+    with BeforeAndAfterAll
+    with BeforeAndAfterEach
+    with Matchers
+    with ScalaFutures
+    with DropCreate
+    with DataGenerationHelper {
+
+  val schemaName: String = "pekko"
+  implicit val timeout: Timeout = Timeout(1.minute)
+  implicit val defaultPatience: PatienceConfig =
+    PatienceConfig(timeout = Span(60, Seconds), interval = Span(100, Millis))
+
+  val customConfig: Config = ConfigFactory.parseString(s"""
+    jdbc-durable-state-store {
+      tables {
+        durable_state {
+          schemaName = "pekko"
+        }
+      }
+    }
+  """)
+
+  implicit lazy val system: ExtendedActorSystem =
+    ActorSystem(
+      "test",
+      customConfig.withFallback(config)
+    ).asInstanceOf[ExtendedActorSystem]
+
+  lazy val db = SlickDatabase.database(
+    config,
+    new SlickConfiguration(config.getConfig("slick")), "slick.db"
+  )
+
+  private val createSchema = s"CREATE SCHEMA IF NOT EXISTS $schemaName;"
+  private val moveDurableStateTableToSchema = s"alter table 
public.durable_state set schema $schemaName;"
+  private val moveDurableStateTableToPublic = s"alter table 
$schemaName.durable_state set schema public;"
+  private val createSchemaAndMoveTable = 
s"${createSchema}${moveDurableStateTableToSchema}"
+  private val removeTableFromSchema = s"${moveDurableStateTableToPublic}"

Review Comment:
   no need for string interpolation on this line



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@pekko.apache.org
For additional commands, e-mail: notifications-h...@pekko.apache.org

Reply via email to