Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pablf committed Jul 2, 2023
1 parent e0aa813 commit a7cc8cc
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/src/test/scala/zio/jdbc/ZConnectionSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,7 @@ object ZConnectionSpec extends ZIOSpecDefault {
name varchar not null,
age int not null
)""")(ps => ZIO.succeed(new DummyException("Error Ocurred", ps, ps.isClosed())))
statementClosedTuple <- res match {
case DummyException(_, preparedStatement, closedInScope) =>
ZIO.succeed((preparedStatement, closedInScope))
case e => ZIO.fail(e)
}
statementClosedTuple <- ZIO.succeed((res.preparedStatement, res.closedInScope))
} yield assertTrue(statementClosedTuple._1.isClosed() && !statementClosedTuple._2)
} //A bit of a hack, DummyException receives the prepared Statement so that its closed State can be checked outside ZConnection's Scope
}
Expand Down

0 comments on commit a7cc8cc

Please sign in to comment.