Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
sj-i committed Nov 25, 2021
1 parent bdbdb51 commit 938a00f
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ function () use (&$counter) {
$this->assertSame(2, $counter);
}

public function testReturnFalseIfRetryCountExceedsMax(): void
public function testThrowIfRetryCountExceedsMax(): void
{
$counter = 0;
$loop = new RetryOnExceptionMiddleware(
Expand All @@ -62,7 +62,11 @@ function () use (&$counter) {
}
)
);
$this->assertFalse($loop->invoke());
try {
$loop->invoke();
} catch (\Exception $e) {
$this->assertSame(Exception::class, $e::class);
}
$this->assertSame(1, $counter);
}

Expand Down

0 comments on commit 938a00f

Please sign in to comment.