Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix contract_tpid_fkey-related race condition #11330

Merged
merged 8 commits into from
Oct 22, 2021
Prev Previous commit
Next Next commit
clean up some now-unneeded printlns
  • Loading branch information
S11001001 committed Oct 21, 2021
commit b2aab2c4d7536bb7112431fc09b7d93997d52b90
Original file line number Diff line number Diff line change
Expand Up @@ -212,17 +212,13 @@ abstract class AbstractDatabaseIntegrationTest extends AsyncFreeSpecLike with Be
"doesn't cache uncommitted template IDs" in {
import dbbackend.Queries.DBContract, spray.json.{JsObject, JsNull, JsValue},
spray.json.DefaultJsonProtocol._
import dao.logHandler, dao.jdbcDriver.q.queries,
queries.{insertContracts, surrogateTemplateId}
import dao.logHandler, dao.jdbcDriver.q.queries

val tpId = TemplateId("pkg", "mod", "UncomCollision")

val simulation = instanceUUIDLogCtx { implicit lc =>
def stid = {
println(s"s11 starting stid")
surrogateTemplateId(tpId.packageId, tpId.moduleName, tpId.entityName)
.map { i => println(s"s11 completed stid"); i }
}
def stid =
queries.surrogateTemplateId(tpId.packageId, tpId.moduleName, tpId.entityName)

for {
_ <- queries.dropAllTablesIfExist
Expand All @@ -231,7 +227,7 @@ abstract class AbstractDatabaseIntegrationTest extends AsyncFreeSpecLike with Be
_ <- stid
_ <- fconn.rollback // as with when we conflict and retry
tpid <- stid
_ <- insertContracts(
_ <- queries.insertContracts(
List(
DBContract(
contractId = "foo",
Expand Down