1414import java .time .ZoneId ;
1515import java .util .Map ;
1616import java .util .concurrent .TimeUnit ;
17- import org .junit .Assert ;
1817import org .junit .Before ;
1918import org .junit .Test ;
19+ import org .junit .jupiter .api .Assertions ;
2020
2121public class TestBackupDynamicRateLimiter {
2222 private static final Instant NOW = Instant .ofEpochMilli (1 << 16 );
@@ -76,15 +76,15 @@ public void targetIsInThePast() {
7676 @ Test
7777 public void noBackupThreads () {
7878 rateLimiter = getRateLimiter (ImmutableMap .of ("Priam.backup.threads" , 0 ), NOW , DIR_SIZE );
79- Assert .assertThrows (
79+ Assertions .assertThrows (
8080 IllegalStateException .class ,
8181 () -> timePermitAcquisition (getBackupPath (), LATER , 20 ));
8282 }
8383
8484 @ Test
8585 public void negativeBackupThreads () {
8686 rateLimiter = getRateLimiter (ImmutableMap .of ("Priam.backup.threads" , -1 ), NOW , DIR_SIZE );
87- Assert .assertThrows (
87+ Assertions .assertThrows (
8888 IllegalStateException .class ,
8989 () -> timePermitAcquisition (getBackupPath (), LATER , 20 ));
9090 }
@@ -99,15 +99,15 @@ public void noData() {
9999 @ Test
100100 public void noPermitsRequested () {
101101 rateLimiter = getRateLimiter (ImmutableMap .of ("Priam.backup.threads" , 1 ), NOW , DIR_SIZE );
102- Assert .assertThrows (
102+ Assertions .assertThrows (
103103 IllegalArgumentException .class ,
104104 () -> timePermitAcquisition (getBackupPath (), LATER , 0 ));
105105 }
106106
107107 @ Test
108108 public void negativePermitsRequested () {
109109 rateLimiter = getRateLimiter (ImmutableMap .of ("Priam.backup.threads" , 1 ), NOW , DIR_SIZE );
110- Assert .assertThrows (
110+ Assertions .assertThrows (
111111 IllegalArgumentException .class ,
112112 () -> timePermitAcquisition (getBackupPath (), LATER , -1 ));
113113 }
0 commit comments