From 6023f241da86b798f877231fed970e7758c3a6bb Mon Sep 17 00:00:00 2001 From: Ben Carter Date: Wed, 30 Aug 2023 20:46:00 +0000 Subject: [PATCH] Surround --- it/src/test/scala/integration/LoadExampleIntSpec.scala | 2 +- src/test/scala/integration/TopicLoaderIntSpec.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/it/src/test/scala/integration/LoadExampleIntSpec.scala b/it/src/test/scala/integration/LoadExampleIntSpec.scala index 538b7e2..56532ee 100644 --- a/it/src/test/scala/integration/LoadExampleIntSpec.scala +++ b/it/src/test/scala/integration/LoadExampleIntSpec.scala @@ -83,6 +83,6 @@ class LoadExampleIntSpec extends KafkaSpecBase[IO] { private def withKafkaContext(test: TestContext[IO] => IO[Assertion]): IO[Assertion] = { object testContext extends TestContext[IO] import testContext.* - embeddedKafka.use(_ => test(testContext)) + embeddedKafka.surround(test(testContext)) } } diff --git a/src/test/scala/integration/TopicLoaderIntSpec.scala b/src/test/scala/integration/TopicLoaderIntSpec.scala index 2aec96a..316e17c 100644 --- a/src/test/scala/integration/TopicLoaderIntSpec.scala +++ b/src/test/scala/integration/TopicLoaderIntSpec.scala @@ -197,7 +197,7 @@ class TopicLoaderIntSpec extends KafkaSpecBase[IO] { assertion <- loadAndRunR(NonEmptyList.one(testTopic1))( _ => loadState.set(true), r => topicState.getAndUpdate(_ :+ r).void - ).use { _ => + ).surround { for { _ <- eventually(topicState.get.asserting(_ should contain theSameElementsAs preLoad)) _ <- loadState.get.asserting(_ shouldBe true) @@ -221,6 +221,6 @@ class TopicLoaderIntSpec extends KafkaSpecBase[IO] { private def withKafkaContext(test: TestContext[IO] => IO[Assertion]): IO[Assertion] = { object testContext extends TestContext[IO] import testContext.* - embeddedKafka.use(_ => test(testContext)) + embeddedKafka.surround(test(testContext)) } }