Skip to content

Commit

Permalink
Fix Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherDavenport committed May 17, 2022
1 parent ad7632e commit d5441bc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ object CircuitedClient {
* @param translatedError This function allows you to translate the Request, Circuit RejectedExecution, and RequestKey and build a Throwable of your own. Default is to build a RejectedExecutionHttp4sClient.
* @param shouldFail This function allows you to determine what counts as a failure when a Response is succesfully retrieved. Default is to see any 5xx Response as a failure.
*/
def generic[F[_], A](
def generic[F[_]](
cbf: Request[F] => CircuitBreaker[Resource[F, *]],
shouldFail: (Request[F], Response[F]) => ShouldCircuitBreakerSeeAsFailure = defaultShouldFail[F](_, _),
translatedError: (Request[F], RejectedExecution) => Option[Throwable] = defaultTranslatedErrorSimple[F](_, _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CircuitedClientSpec extends CatsEffectSuite {

val test = for {
circuit <- CircuitBreaker.in[IO, Resource[IO, *]](0, 20.seconds)
newClient = CircuitedClient(circuit)(iClient)
newClient = CircuitedClient.generic[IO](Function.const(circuit))(iClient)
_ <- newClient.expect[String](Request[IO](Method.GET)).attempt
e <- newClient.expect[String](Request[IO](Method.GET)).attempt
} yield e
Expand Down

0 comments on commit d5441bc

Please sign in to comment.