Remove usages from tests
This commit is contained in:
@@ -13,7 +13,7 @@ class ThreadTest {
|
|||||||
|
|
||||||
val pool = Executors.newFixedThreadPool(1)
|
val pool = Executors.newFixedThreadPool(1)
|
||||||
val countDown = CountDownLatch(1)
|
val countDown = CountDownLatch(1)
|
||||||
pool {
|
pool execute {
|
||||||
countDown.countDown()
|
countDown.countDown()
|
||||||
}
|
}
|
||||||
assertTrue(countDown.await(2, SECONDS), "Count down is executed")
|
assertTrue(countDown.await(2, SECONDS), "Count down is executed")
|
||||||
@@ -22,8 +22,8 @@ class ThreadTest {
|
|||||||
test fun callableInvoke() {
|
test fun callableInvoke() {
|
||||||
|
|
||||||
val pool = Executors.newFixedThreadPool(1)
|
val pool = Executors.newFixedThreadPool(1)
|
||||||
val future = pool<String> {
|
val future = pool.submit<String> { // type specification required here to choose overload for callable, see KT-7882
|
||||||
"Hello"
|
"Hello"
|
||||||
}
|
}
|
||||||
assertEquals("Hello", future.get(2, SECONDS))
|
assertEquals("Hello", future.get(2, SECONDS))
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user