@@ -5,7 +5,7 @@ import munit.FunSuite
5
5
import retry .{RetryDetails , RetryPolicies , Sleep }
6
6
7
7
import scala .collection .mutable .ArrayBuffer
8
- import scala .concurrent .duration ._
8
+ import scala .concurrent .duration .*
9
9
10
10
class PackageObjectSuite extends FunSuite {
11
11
type ErrorOr [A ] = Either [Throwable , A ]
@@ -49,10 +49,8 @@ class PackageObjectSuite extends FunSuite {
49
49
retryingOnSomeErrors(policy, isWorthRetrying, onMtlError) {
50
50
attempts = attempts + 1
51
51
52
- if (attempts < 3 )
53
- EitherT .leftT[ErrorOr , String ](" one more time" )
54
- else
55
- EitherT .pure[ErrorOr , String ](" yay" )
52
+ if attempts < 3 then EitherT .leftT[ErrorOr , String ](" one more time" )
53
+ else EitherT .pure[ErrorOr , String ](" yay" )
56
54
}
57
55
58
56
assertEquals(finalResult.value, Right (Right (" yay" )))
@@ -73,10 +71,8 @@ class PackageObjectSuite extends FunSuite {
73
71
retryingOnSomeErrors(policy, isWorthRetrying, onMtlError) {
74
72
attempts = attempts + 1
75
73
76
- if (attempts < 3 )
77
- EitherT .leftT[ErrorOr , String ](" one more time" )
78
- else
79
- EitherT .leftT[ErrorOr , String ](" nope" )
74
+ if attempts < 3 then EitherT .leftT[ErrorOr , String ](" one more time" )
75
+ else EitherT .leftT[ErrorOr , String ](" nope" )
80
76
}
81
77
82
78
assertEquals(finalResult.value, Right (Left (" nope" )))
@@ -138,10 +134,8 @@ class PackageObjectSuite extends FunSuite {
138
134
val finalResult = retryingOnAllErrors(policy, onMtlError) {
139
135
attempts = attempts + 1
140
136
141
- if (attempts < 3 )
142
- EitherT .leftT[ErrorOr , String ](" one more time" )
143
- else
144
- EitherT .pure[ErrorOr , String ](" yay" )
137
+ if attempts < 3 then EitherT .leftT[ErrorOr , String ](" one more time" )
138
+ else EitherT .pure[ErrorOr , String ](" yay" )
145
139
}
146
140
147
141
assertEquals(finalResult.value, Right (Right (" yay" )))
0 commit comments