Skip to content

Commit 5db8452

Browse files
committed
Adds a smoke test with the reduced syntax format.
1 parent 954b7d2 commit 5db8452

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/test/scala/PolicySpec.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,17 @@ class PolicySpec extends FunSpec with BeforeAndAfterAll {
5757
Await.ready(future, Duration.Inf)
5858
assert(counter.get() === 4)
5959
}
60+
61+
it ("should accept a future in reduced syntax format") {
62+
implicit val success = Success.always
63+
val counter = new AtomicInteger()
64+
val future = retry.Directly(1) {
65+
counter.incrementAndGet()
66+
Future.failed(new RuntimeException("always failing"))
67+
}
68+
Await.ready(future, Duration.Inf)
69+
assert(counter.get() === 2)
70+
}
6071
}
6172

6273
describe("retry.Pause") {

0 commit comments

Comments
 (0)