Skip to content

Commit

Permalink
Update h2_v2 dependency (JetBrains#1462)
Browse files Browse the repository at this point in the history
* update Gradle to 7.4

* update h2_v2 to 2.0.206; remove workaround for bug in previous version of h2_v2

* update h2_v2 to 2.1.210; adjust tests for new behaviour of H2
  • Loading branch information
naftalmm authored Feb 22, 2022
1 parent 5fd50f1 commit 4015c04
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ object Versions {

/** JDBC drivers **/
const val h2 = "1.4.199"
const val h2_v2 = "2.0.202"
const val h2_v2 = "2.1.210"
const val mariaDB = "2.7.4"
const val mysql51 = "5.1.49"
const val mysql80 = "8.0.27"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ enum class TestDB(
val mode = Mode.getInstance("MySQL")
(field as KMutableProperty1<Mode, Boolean>).set(mode, false)
}
},
dbConfig = {
defaultIsolationLevel = Connection.TRANSACTION_READ_COMMITTED
}),
}
),
SQLITE({ "jdbc:sqlite:file:test?mode=memory&cache=shared" }, "org.sqlite.JDBC"),
MYSQL(
connection = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import org.jetbrains.exposed.sql.tests.shared.assertEqualCollections
import org.jetbrains.exposed.sql.tests.shared.assertEqualLists
import org.jetbrains.exposed.sql.tests.shared.assertEquals
import org.jetbrains.exposed.sql.tests.shared.expectException
import org.jetbrains.exposed.sql.vendors.H2Dialect
import org.jetbrains.exposed.sql.vendors.MariaDBDialect
import org.jetbrains.exposed.sql.vendors.PostgreSQLDialect
import org.jetbrains.exposed.sql.vendors.SQLServerDialect
Expand Down Expand Up @@ -85,6 +86,7 @@ class UnionTests : DatabaseTestsBase() {
val expectedUsers = usersQuery.map { it[users.id] } + "sergey"
val intersectAppliedFirst = when (currentDialect) {
is PostgreSQLDialect, is SQLServerDialect, is MariaDBDialect -> true
is H2Dialect -> (currentDialect as H2Dialect).isSecondVersion
else -> false
}
usersQuery.unionAll(usersQuery).intersect(sergeyQuery).map { it[users.id] }.apply {
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 4015c04

Please sign in to comment.