Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
Denys Fakhritdinov committed Nov 2, 2023
1 parent e074b57 commit e19f7e6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import com.evolutiongaming.smetrics.MetricsHelper._
import com.evolutiongaming.smetrics._

import java.nio.ByteBuffer
import java.util.UUID
import scala.concurrent.duration._

/** Metainfo of events written to Kafka, but not yet replicated to Cassandra.
Expand Down Expand Up @@ -132,7 +133,7 @@ object HeadCache {
metrics,
pointer = KafkaConsumerOf[F].apply[Partition, Offset](
consumerConfig.copy(
groupId = none,
groupId = UUID.randomUUID().toString.some,
autoCommit = true,
autoCommitInterval = 5.seconds.some,
autoOffsetReset = AutoOffsetReset.Latest,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import com.evolutiongaming.smetrics.CollectorRegistry
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AsyncWordSpec
import com.evolutiongaming.retry.Sleep
import com.evolutiongaming.skafka.consumer.{ConsumerRecord, ConsumerRecords}
import com.evolutiongaming.skafka.consumer.{Consumer, ConsumerRecord, ConsumerRecords}

import scala.collection.immutable.Queue
import scala.concurrent.duration._
Expand Down Expand Up @@ -188,7 +188,7 @@ class HeadCacheSpec extends AsyncWordSpec with Matchers {
"timeout" in {
val consumer = TopicCache.Consumer.empty[IO]
val headCache = headCacheOf(
HeadCache.Eventual.empty,
HeadCache.Eventual.empty,
consumer.pure[IO].toResource,
config.copy(timeout = 10.millis))
val result = headCache.use { headCache =>
Expand Down Expand Up @@ -276,7 +276,7 @@ object HeadCacheSpec {
headers = headers).get
}


implicit val LogIO: Log[IO] = Log.empty[IO]


Expand All @@ -294,7 +294,7 @@ object HeadCacheSpec {
eventual = eventual,
consumer = consumer,
metrics = metrics.some,
pointer = ???
pointer = KafkaConsumer.of(Consumer.empty[IO, Partition, Offset].pure[Resource[IO, *]])
)
} yield headCache
}
Expand Down Expand Up @@ -377,7 +377,7 @@ object HeadCacheSpec {
}
}
}


case object TestError extends RuntimeException with NoStackTrace
}

0 comments on commit e19f7e6

Please sign in to comment.