Skip to content

Commit f595c4c

Browse files
committed
Fixed test
1 parent 298a6ad commit f595c4c

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/test/kotlin/g1101_1200/s1195_fizz_buzz_multithreaded/FizzBuzzTest.kt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ internal class FizzBuzzTest {
1414
Thread {
1515
try {
1616
fizzBuzz.fizz { fizz[0]++ }
17-
} catch (e: InterruptedException) {
17+
} catch (_: InterruptedException) {
1818
}
1919
}
2020
.start()
2121
Thread {
2222
try {
2323
fizzBuzz.buzz { fizz[0]++ }
24-
} catch (e: InterruptedException) {
24+
} catch (_: InterruptedException) {
2525
}
2626
}
2727
.start()
2828
Thread {
2929
try {
3030
fizzBuzz.fizzbuzz { fizz[0]++ }
31-
} catch (e: InterruptedException) {
31+
} catch (_: InterruptedException) {
3232
}
3333
}
3434
.start()
3535
Thread {
3636
try {
3737
fizzBuzz.number { _: Int -> fizz[0]++ }
38-
} catch (e: InterruptedException) {
38+
} catch (_: InterruptedException) {
3939
}
4040
}
4141
.start()
42-
TimeUnit.MILLISECONDS.sleep(2000)
42+
TimeUnit.MILLISECONDS.sleep(2200)
4343
assertThat(fizz[0] > 0, equalTo(true))
4444
}
4545

@@ -51,28 +51,28 @@ internal class FizzBuzzTest {
5151
Thread {
5252
try {
5353
fizzBuzz.fizz { fizz[0]++ }
54-
} catch (e: InterruptedException) {
54+
} catch (_: InterruptedException) {
5555
}
5656
}
5757
.start()
5858
Thread {
5959
try {
6060
fizzBuzz.buzz { fizz[0]++ }
61-
} catch (e: InterruptedException) {
61+
} catch (_: InterruptedException) {
6262
}
6363
}
6464
.start()
6565
Thread {
6666
try {
6767
fizzBuzz.fizzbuzz { fizz[0]++ }
68-
} catch (e: InterruptedException) {
68+
} catch (_: InterruptedException) {
6969
}
7070
}
7171
.start()
7272
Thread {
7373
try {
7474
fizzBuzz.number { _: Int -> fizz[0]++ }
75-
} catch (e: InterruptedException) {
75+
} catch (_: InterruptedException) {
7676
}
7777
}
7878
.start()

0 commit comments

Comments
 (0)