1 /* <lambda>null2 * Copyright 2016-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license. 3 */ 4 5 package kotlinx.coroutines 6 7 import org.junit.* 8 9 class TestBaseTest : TestBase() { 10 @Test 11 fun testThreadsShutdown() { 12 repeat(1000 * stressTestMultiplier) { _ -> 13 initPoolsBeforeTest() 14 val threadsBefore = currentThreads() 15 runBlocking { 16 val sub = launch { 17 delay(10000000L) 18 } 19 sub.cancel() 20 sub.join() 21 } 22 shutdownPoolsAfterTest() 23 checkTestThreads(threadsBefore) 24 } 25 26 } 27 }