Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions modules/doobie-core/src/test/scala/DoobieDatabaseSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@ package grackle.doobie.test
import java.time.Duration

import io.circe.{Decoder => CDecoder, Encoder => CEncoder}
import munit.CatsEffectSuite
import org.typelevel.doobie.Meta

import grackle.doobie.DoobieMappingLike
import grackle.sql.test._

trait DoobieDatabaseSuite extends CatsEffectSuite {
trait DoobieDatabaseSuite extends SqlDatabaseSuite {
trait DoobieTestMapping[F[_]] extends DoobieMappingLike[F] with SqlTestMapping[F] {

type TestCodec[T] = (Meta[T], Boolean)
Expand Down
30 changes: 30 additions & 0 deletions modules/sql-core/src/test/scala/SqlDatabaseSuite.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// Copyright (c) 2016-2025 Association of Universities for Research in Astronomy, Inc. (AURA)
// Copyright (c) 2016-2025 Grackle Contributors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package grackle.sql.test

import scala.concurrent.duration._

import munit.CatsEffectSuite

/**
* Common base for the per-backend database suite traits, raising munit-cats-effect's 30s
* default timeout: database-backed tests can exceed it for reasons that have nothing to do with
* the test itself, e.g. several forked backend test JVMs contending for one docker daemon on a
* constrained machine, showing up as spurious timeouts rather than failures.
*/
trait SqlDatabaseSuite extends CatsEffectSuite {
override def munitIOTimeout: Duration = 2.minutes
}
4 changes: 2 additions & 2 deletions modules/sql-pg/js-jvm/src/test/scala/SqlPgDatabaseSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

package grackle.sqlpg.test

import munit.CatsEffectSuite
import grackle.sql.test.SqlDatabaseSuite

trait SqlPgDatabaseSuite extends CatsEffectSuite {
trait SqlPgDatabaseSuite extends SqlDatabaseSuite {
case class PostgresConnectionInfo(host: String, port: Int) {

val driverClassName = "org.postgresql.Driver"
Expand Down
Loading