Skip to content

Commit

Permalink
Upgrades ZIO to 2.0.13
Browse files Browse the repository at this point in the history
  • Loading branch information
gaelrenoux committed May 28, 2023
1 parent c7e2719 commit e989043
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ Check the backward compatibility information on those libraries to check which v
| 3.0.0 | 2.12 2.13 | 1.0.11 | 1.0.0-RC2 | 2.6.10 |
| 4.0.0 | 2.12 2.13 | 2.0.0 | 1.0.0-RC2 | 2.6.10 |
| 4.1.0 | 2.12 2.13 3 | 2.0.2 | 1.0.0-RC2 | 2.7.0 |
| master | 2.12 2.13 3 | 2.0.2 | 1.0.0-RC2 | 2.7.0 |
| master | 2.12 2.13 3 | 2.0.13 | 1.0.0-RC2 | 2.7.0 |



Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ scalacOptions ++= allVersionsOption ++ {
}


val ZioVersion = "2.0.2"
val ZioVersion = "2.0.13"
val ZioCatsVersion = "3.3.0"
val DoobieVersion = "1.0.0-RC2"
val AnormVersion = "2.7.0"
Expand Down
4 changes: 2 additions & 2 deletions src/samples/scala/samples/anorm/test/SomeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ package samples.anorm.test

import io.github.gaelrenoux.tranzactio.anorm._
import samples.anorm.PersonQueries
import zio.ZLayer
import zio.test._
import zio.{Scope, ZLayer}


/** This is a test where you check you business methods, using stub queries. */
Expand All @@ -12,7 +12,7 @@ object SomeTest extends ZIOSpec[TestEnvironment with Database with PersonQueries
type MySpec = Spec[Env, Any]

/** Using a 'none' Database, because we're not actually using it */
override def bootstrap: ZLayer[Scope, Any, Env] = testEnvironment ++ PersonQueries.test ++ Database.none
override def bootstrap: ZLayer[Any, Any, Env] = testEnvironment ++ PersonQueries.test ++ Database.none

override def spec: MySpec = suite("My tests with Anorm")(
myTest
Expand Down
4 changes: 2 additions & 2 deletions src/samples/scala/samples/doobie/test/SomeTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package samples.doobie.test

import io.github.gaelrenoux.tranzactio.doobie._
import samples.doobie.PersonQueries
import zio.ZLayer
import zio.test.Assertion._
import zio.test._
import zio.{Scope, ZLayer}


/** This is a test where you check you business methods, using stub queries. */
Expand All @@ -13,7 +13,7 @@ object SomeTest extends ZIOSpec[TestEnvironment with Database with PersonQueries
type MySpec = Spec[Env, Any]

/** Using a 'none' Database, because we're not actually using it */
override def bootstrap: ZLayer[Scope, Any, Env] = testEnvironment ++ PersonQueries.test ++ Database.none
override def bootstrap: ZLayer[Any, Any, Env] = testEnvironment ++ PersonQueries.test ++ Database.none

override def spec: MySpec = suite("My tests with Doobie")(
myTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package io.github.gaelrenoux.tranzactio

import org.h2.jdbcx.JdbcDataSource
import zio.test.testEnvironment
import zio.{Scope, ZIO, ZLayer}
import zio.{ZIO, ZLayer}

import java.sql.{Connection, DriverManager}
import java.util.UUID
Expand Down Expand Up @@ -30,7 +30,7 @@ object JdbcLayers {
}
)

def datasourceU: ZLayer[Scope, Nothing, DataSource] = testEnvironment >>> datasource.orDie
def datasourceU: ZLayer[Any, Nothing, DataSource] = testEnvironment >>> datasource.orDie

/** Generates a layer providing a single connection. Connection will not be closed until you close the JVM. */
def connection: ZLayer[Any, Throwable, Connection] = ZLayer.fromZIO {
Expand All @@ -40,6 +40,6 @@ object JdbcLayers {
}
}

def connectionU: ZLayer[Scope, Nothing, Connection] = testEnvironment >>> connection.orDie
def connectionU: ZLayer[Any, Nothing, Connection] = testEnvironment >>> connection.orDie

}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ object SingleConnectionSourceTest extends ZIOSpec[TestEnvironment with Connectio

// TODO add aspect to timeout tests to 5 seconds

override def bootstrap: ZLayer[Scope, Any, Env] = csLayer ++ testEnvironment
override def bootstrap: ZLayer[Any, Any, Env] = csLayer ++ testEnvironment

lazy val csLayer: ZLayer[Scope, Nothing, ConnectionSource] = (JdbcLayers.connectionU ++ testEnvironment) >>> ConnectionSource.fromConnection
lazy val csLayer: ZLayer[Any, Nothing, ConnectionSource] = (JdbcLayers.connectionU ++ testEnvironment) >>> ConnectionSource.fromConnection

val connectionCountSql = "select count(*) from information_schema.sessions"

Expand Down

0 comments on commit e989043

Please sign in to comment.