This commit is contained in:
zeus
2025-01-28 12:28:03 +08:00
parent 738c373a77
commit ec96756800
2534 changed files with 486292 additions and 0 deletions
@@ -0,0 +1,21 @@
import XCTest
import GRDB
class DatabasePoolCrashTests: GRDBCrashTestCase {
func testReaderCanNotStartTransaction() {
assertCrash("DatabasePool readers can not start transactions or savepoints.") {
try dbPool.read { db in
let statement = try db.makeStatement(sql: "BEGIN TRANSACTION")
}
}
}
func testReaderCanNotStartSavepoint() {
assertCrash("DatabasePool readers can not start transactions or savepoints.") {
try dbPool.read { db in
let statement = try db.makeStatement(sql: "SAVEPOINT foo")
}
}
}
}