From 673b9901fd977f9b676b8ba803abb358921992c8 Mon Sep 17 00:00:00 2001 From: Ostrzyciel Date: Wed, 11 Oct 2023 15:48:57 +0200 Subject: [PATCH] Try to fix flaky tests Something is wrong with Jena init... https://github.com/Jelly-RDF/jelly-jvm/actions/runs/6483252201/job/17604415514 --- .../jelly/integration_tests/CrossStreamingSpec.scala | 3 +++ .../ostrzyciel/jelly/integration_tests/io/IoSerDesSpec.scala | 3 +++ 2 files changed, 6 insertions(+) diff --git a/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/CrossStreamingSpec.scala b/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/CrossStreamingSpec.scala index c3ba0f28..cdfdee20 100644 --- a/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/CrossStreamingSpec.scala +++ b/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/CrossStreamingSpec.scala @@ -7,6 +7,7 @@ import org.apache.jena.graph.Graph import org.apache.jena.riot.{Lang, RDFDataMgr, RDFParser} import org.apache.jena.sparql.core.DatasetGraph import org.apache.jena.sparql.util.IsoMatcher +import org.apache.jena.sys.JenaSystem import org.apache.pekko.actor.ActorSystem import org.apache.pekko.stream.scaladsl.* import org.scalatest.concurrent.ScalaFutures @@ -23,6 +24,8 @@ class CrossStreamingSpec extends AnyWordSpec, Matchers, ScalaFutures: implicit val actorSystem: ActorSystem = ActorSystem() implicit val ec: ExecutionContext = actorSystem.getDispatcher implicit val defaultPatience: PatienceConfig = PatienceConfig(timeout = 5.seconds, interval = 50.millis) + + JenaSystem.init() private val implementations: Seq[(String, TestStream)] = Seq( ("Jena", JenaTestStream), diff --git a/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/io/IoSerDesSpec.scala b/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/io/IoSerDesSpec.scala index 63b1e1b7..d5154627 100644 --- a/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/io/IoSerDesSpec.scala +++ b/integration-tests/src/test/scala/eu/ostrzyciel/jelly/integration_tests/io/IoSerDesSpec.scala @@ -2,6 +2,7 @@ package eu.ostrzyciel.jelly.integration_tests.io import eu.ostrzyciel.jelly.core.JellyOptions import eu.ostrzyciel.jelly.core.proto.v1.RdfStreamOptions +import org.apache.jena.sys.JenaSystem import org.apache.pekko.actor.ActorSystem import org.scalatest.concurrent.ScalaFutures import org.scalatest.matchers.should.Matchers @@ -15,6 +16,8 @@ import java.io.{ByteArrayInputStream, ByteArrayOutputStream, File, FileInputStre class IoSerDesSpec extends AnyWordSpec, Matchers, ScalaFutures: implicit val as: ActorSystem = ActorSystem("test") + JenaSystem.init() + val casesTriples: Seq[(String, File)] = Seq[String]( "weather.nt", "p2_ontology.nt", "nt-syntax-subm-01.nt", "rdf-star.nt", "rdf-star-blanks.nt" ).map(name => (