Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Commit

Permalink
ADAPT1-1599 | set the default value
Browse files Browse the repository at this point in the history
  • Loading branch information
aadit-chugh committed Jul 11, 2024
1 parent 8b7d594 commit 8c8854e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions avro/src/main/scala/hydra/avro/registry/SchemaRegistry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -194,19 +194,19 @@ object SchemaRegistry {
}

def test[F[_] : Sync : Logger : Sleep]: F[SchemaRegistry[F]] = Sync[F].delay {
getFromSchemaRegistryClient(new MockSchemaRegistryClient, schemaRegistryClientRetries = 0, schemaRegistryClientRetriesDelay = 1.milliseconds, useExponentialBackoff = false)
getFromSchemaRegistryClient(new MockSchemaRegistryClient, schemaRegistryClientRetries = 0, schemaRegistryClientRetriesDelay = 1.milliseconds)
}

def test[F[_] : Sync : Logger : Sleep](mockedClient: SchemaRegistryClient, schemaRegistryClientRetries: Int = 3,
schemaRegistryClientRetriesDelay: FiniteDuration = 500.milliseconds): F[SchemaRegistry[F]] = Sync[F].delay {
getFromSchemaRegistryClient(mockedClient, schemaRegistryClientRetries, schemaRegistryClientRetriesDelay, useExponentialBackoff = false)
getFromSchemaRegistryClient(mockedClient, schemaRegistryClientRetries, schemaRegistryClientRetriesDelay)
}

// scalastyle:off method.length
private def getFromSchemaRegistryClient[F[_] : Sync : Logger : Sleep](schemaRegistryClient: SchemaRegistryClient,
schemaRegistryClientRetries: Int,
schemaRegistryClientRetriesDelay: FiniteDuration,
useExponentialBackoff: Boolean): SchemaRegistry[F] =
useExponentialBackoff: Boolean = false): SchemaRegistry[F] =
new SchemaRegistry[F] {
val retryPolicy = if (useExponentialBackoff) {
limitRetries(schemaRegistryClientRetries) |+| exponentialBackoff[F](schemaRegistryClientRetriesDelay)
Expand Down

0 comments on commit 8c8854e

Please sign in to comment.