From 57907609376b47ce0659ffcc1aa4ae8ac9606fe2 Mon Sep 17 00:00:00 2001 From: Oliver <20188437+olivergrabinski@users.noreply.github.com> Date: Fri, 8 Mar 2024 13:07:59 +0100 Subject: [PATCH] Lazy calls for transactors --- .../epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala | 2 +- .../nexus/delta/sdk/resources/ResourcesImplSpec.scala | 4 ++-- .../bluebrain/nexus/delta/sdk/schemas/SchemasImplSuite.scala | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala b/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala index ebb0e04324..384fb23309 100644 --- a/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala +++ b/delta/app/src/test/scala/ch/epfl/bluebrain/nexus/delta/routes/SchemasRoutesSpec.scala @@ -80,7 +80,7 @@ class SchemasRoutesSpec extends BaseRouteSpec with IOFromMap with CatsIOValues { private val config = SchemasConfig(eventLogConfig) private val schemaDef = Schemas.definition(ValidateSchema.apply, clock) - private val schemaLog = ScopedEventLog(schemaDef, config.eventLog, xas) + private lazy val schemaLog = ScopedEventLog(schemaDef, config.eventLog, xas) private lazy val routes = Route.seal( diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/resources/ResourcesImplSpec.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/resources/ResourcesImplSpec.scala index 50aff6768f..ed93effc4f 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/resources/ResourcesImplSpec.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/resources/ResourcesImplSpec.scala @@ -95,8 +95,8 @@ class ResourcesImplSpec (r, p, _) => resources.fetch(r, p).attempt.map(_.left.map(_ => ResourceResolutionReport())) ) - private val resourceDef = Resources.definition(ValidateResource(resourceResolution), detectChanges, clock) - private val resourceLog = ScopedEventLog(resourceDef, eventLogConfig, xas) + private val resourceDef = Resources.definition(ValidateResource(resourceResolution), detectChanges, clock) + private lazy val resourceLog = ScopedEventLog(resourceDef, eventLogConfig, xas) private lazy val resources: Resources = ResourcesImpl( resourceLog, diff --git a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/schemas/SchemasImplSuite.scala b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/schemas/SchemasImplSuite.scala index 7470e4c29b..bd06c3827a 100644 --- a/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/schemas/SchemasImplSuite.scala +++ b/delta/sdk/src/test/scala/ch/epfl/bluebrain/nexus/delta/sdk/schemas/SchemasImplSuite.scala @@ -76,8 +76,8 @@ class SchemasImplSuite extends NexusSuite with Doobie.Fixture with ConfigFixture private val fetchContext = FetchContextDummy(Map(project.ref -> project.context), Set(projectDeprecated.ref)) private val config = SchemasConfig(eventLogConfig) - private val schemaDef = Schemas.definition(ValidateSchema.apply, clock) - private val schemaLog = ScopedEventLog(schemaDef, config.eventLog, xas) + private val schemaDef = Schemas.definition(ValidateSchema.apply, clock) + private lazy val schemaLog = ScopedEventLog(schemaDef, config.eventLog, xas) private lazy val schemas: Schemas = SchemasImpl(schemaLog, fetchContext, schemaImports, resolverContextResolution)