Skip to content

Commit

Permalink
Skip resetting DB if DataSourceService has not started
Browse files Browse the repository at this point in the history
GitOrigin-RevId: efb52773373ea3687903bc3fb2825abc36c595bd
  • Loading branch information
mmollaverdi authored and svc-squareup-copybara committed Aug 13, 2024
1 parent 88efd9e commit 97d5860
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class JdbcTestFixture(
private val persistentTables = setOf("schema_version")

override fun reset() {
if (!dataSourceService.isRunning) {
logger.info { "Skipping truncate tables because data source is not running" }
return
}
val stopwatch = Stopwatch.createStarted()

val truncatedTableNames = shards(dataSourceService).get().flatMap { shard ->
Expand Down

0 comments on commit 97d5860

Please sign in to comment.