Skip to content

Commit

Permalink
#415 Add type annotation since for some reason Scala fails to compile…
Browse files Browse the repository at this point in the history
… there.
  • Loading branch information
yruslan committed May 31, 2024
1 parent fe34063 commit 179dd45
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class RetryableHttpClientSuite extends AnyWordSpec {
"execute" should {
"return the response if the first attempt succeeds" in {
val spy = new SimpleHttpClientSpy()
val client = new RetryableHttpClient(spy, 3, 1000)
val client: SimpleHttpClient = new RetryableHttpClient(spy, 3, 1000)

val response = client.execute(request)

Expand All @@ -38,7 +38,7 @@ class RetryableHttpClientSuite extends AnyWordSpec {

"return the response if the first attempt fails, but next one succeeds" in {
val spy = new SimpleHttpClientSpy(failNTimes = 1)
val client = new RetryableHttpClient(spy, 3, 1000)
val client: SimpleHttpClient = new RetryableHttpClient(spy, 3, 1000)

val response = client.execute(request)

Expand All @@ -49,7 +49,7 @@ class RetryableHttpClientSuite extends AnyWordSpec {

"throw an exception if out of attempts" in {
val spy = new SimpleHttpClientSpy(failNTimes = 3)
val client = new RetryableHttpClient(spy, 3, 1000)
val client: SimpleHttpClient = new RetryableHttpClient(spy, 3, 1000)

val ex = intercept[RuntimeException] {
client.execute(request)
Expand All @@ -64,7 +64,7 @@ class RetryableHttpClientSuite extends AnyWordSpec {
"close" should {
"call super.close" in {
val spy = new SimpleHttpClientSpy()
val client = new RetryableHttpClient(spy, 3, 1000)
val client: SimpleHttpClient = new RetryableHttpClient(spy, 3, 1000)

client.close()

Expand Down

0 comments on commit 179dd45

Please sign in to comment.