From 0163c8996b8a615ba6be0c8a231bcc820f717953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donatas=20Ku=C4=8Dinskas?= Date: Fri, 8 Nov 2024 15:11:08 +0200 Subject: [PATCH 1/2] Improve scaladocs of `eventually` --- .../main/scala/org/specs2/execute/EventuallyResults.scala | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala b/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala index bb5746e991..240e7e200f 100644 --- a/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala +++ b/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala @@ -40,12 +40,14 @@ trait EventuallyResults: else retry(0) /** @return - * a matcher that will retry the nested matcher a given number of times + * a matcher that will retry the nested matcher a given number of times with given duration of sleep in between */ def eventually[T: AsResult](retries: Int, sleep: Duration)(result: =>T): T = eventually[T](retries, (_: Int) => sleep)(result) - /** @return a result that is retried at least 40 times until it's ok */ + /** @return + * a matcher that will retry the nested matcher 40 times until it's ok with 100ms sleep in between + */ def eventually[T: AsResult](result: =>T): T = eventually(40, (_: Int) => 100.millis)(result) From a4f63aa2ebf1f197e794581e7b88b6c0b037966d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donatas=20Ku=C4=8Dinskas?= Date: Fri, 8 Nov 2024 15:16:35 +0200 Subject: [PATCH 2/2] Update EventuallyResults.scala --- .../src/main/scala/org/specs2/execute/EventuallyResults.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala b/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala index 240e7e200f..e463283c9c 100644 --- a/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala +++ b/common/shared/src/main/scala/org/specs2/execute/EventuallyResults.scala @@ -40,7 +40,7 @@ trait EventuallyResults: else retry(0) /** @return - * a matcher that will retry the nested matcher a given number of times with given duration of sleep in between + * a matcher that will retry the nested matcher a given number of times with a given duration of sleep in between */ def eventually[T: AsResult](retries: Int, sleep: Duration)(result: =>T): T = eventually[T](retries, (_: Int) => sleep)(result)