Skip to content

Commit 59488d1

Browse files
authored
Remove TestCoroutineContext.kt completely (#3291)
Fixes #3218
1 parent 8cdb4d6 commit 59488d1

File tree

5 files changed

+1
-302
lines changed

5 files changed

+1
-302
lines changed

kotlinx-coroutines-core/README.md

-4
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,6 @@ Select expression to perform multiple suspending operations simultaneously until
8383

8484
Low-level primitives for finer-grained control of coroutines.
8585

86-
# Package kotlinx.coroutines.test
87-
88-
Obsolete and deprecated module to test coroutines. Replaced with `kotlinx-coroutines-test` module.
89-
9086
<!--- MODULE kotlinx-coroutines-core -->
9187
<!--- INDEX kotlinx.coroutines -->
9288

kotlinx-coroutines-core/api/kotlinx-coroutines-core.api

-33
Original file line numberDiff line numberDiff line change
@@ -1299,36 +1299,3 @@ public final class kotlinx/coroutines/sync/SemaphoreKt {
12991299
public static final fun withPermit (Lkotlinx/coroutines/sync/Semaphore;Lkotlin/jvm/functions/Function0;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;
13001300
}
13011301

1302-
public final class kotlinx/coroutines/test/TestCoroutineContext : kotlin/coroutines/CoroutineContext {
1303-
public fun <init> ()V
1304-
public fun <init> (Ljava/lang/String;)V
1305-
public synthetic fun <init> (Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
1306-
public final fun advanceTimeBy (JLjava/util/concurrent/TimeUnit;)J
1307-
public static synthetic fun advanceTimeBy$default (Lkotlinx/coroutines/test/TestCoroutineContext;JLjava/util/concurrent/TimeUnit;ILjava/lang/Object;)J
1308-
public final fun advanceTimeTo (JLjava/util/concurrent/TimeUnit;)V
1309-
public static synthetic fun advanceTimeTo$default (Lkotlinx/coroutines/test/TestCoroutineContext;JLjava/util/concurrent/TimeUnit;ILjava/lang/Object;)V
1310-
public final fun assertAllUnhandledExceptions (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
1311-
public static synthetic fun assertAllUnhandledExceptions$default (Lkotlinx/coroutines/test/TestCoroutineContext;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
1312-
public final fun assertAnyUnhandledException (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
1313-
public static synthetic fun assertAnyUnhandledException$default (Lkotlinx/coroutines/test/TestCoroutineContext;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
1314-
public final fun assertExceptions (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
1315-
public static synthetic fun assertExceptions$default (Lkotlinx/coroutines/test/TestCoroutineContext;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
1316-
public final fun assertUnhandledException (Ljava/lang/String;Lkotlin/jvm/functions/Function1;)V
1317-
public static synthetic fun assertUnhandledException$default (Lkotlinx/coroutines/test/TestCoroutineContext;Ljava/lang/String;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
1318-
public final fun cancelAllActions ()V
1319-
public fun fold (Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;
1320-
public fun get (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext$Element;
1321-
public final fun getExceptions ()Ljava/util/List;
1322-
public fun minusKey (Lkotlin/coroutines/CoroutineContext$Key;)Lkotlin/coroutines/CoroutineContext;
1323-
public final fun now (Ljava/util/concurrent/TimeUnit;)J
1324-
public static synthetic fun now$default (Lkotlinx/coroutines/test/TestCoroutineContext;Ljava/util/concurrent/TimeUnit;ILjava/lang/Object;)J
1325-
public fun plus (Lkotlin/coroutines/CoroutineContext;)Lkotlin/coroutines/CoroutineContext;
1326-
public fun toString ()Ljava/lang/String;
1327-
public final fun triggerActions ()V
1328-
}
1329-
1330-
public final class kotlinx/coroutines/test/TestCoroutineContextKt {
1331-
public static final fun withTestContext (Lkotlinx/coroutines/test/TestCoroutineContext;Lkotlin/jvm/functions/Function1;)V
1332-
public static synthetic fun withTestContext$default (Lkotlinx/coroutines/test/TestCoroutineContext;Lkotlin/jvm/functions/Function1;ILjava/lang/Object;)V
1333-
}
1334-

kotlinx-coroutines-core/build.gradle

+1-2
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,7 @@ tasks.jvmLincheckTest {
274274
}
275275

276276
def commonKoverExcludes =
277-
["kotlinx.coroutines.test.*", // Deprecated package for removal
278-
"kotlinx.coroutines.debug.*", // Tested by debug module
277+
["kotlinx.coroutines.debug.*", // Tested by debug module
279278
"kotlinx.coroutines.channels.ChannelsKt__DeprecatedKt.*", // Deprecated
280279
"kotlinx.coroutines.scheduling.LimitingDispatcher", // Deprecated
281280
"kotlinx.coroutines.scheduling.ExperimentalCoroutineDispatcher" // Deprecated

kotlinx-coroutines-core/jvm/src/test_/TestCoroutineContext.kt

-260
This file was deleted.

kotlinx-coroutines-debug/src/CoroutinesBlockHoundIntegration.kt

-3
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ public class CoroutinesBlockHoundIntegration : BlockHoundIntegration {
7777
for (method in listOf("clear", "peek", "removeFirstOrNull", "addLast")) {
7878
allowBlockingCallsInside("kotlinx.coroutines.internal.ThreadSafeHeap", method)
7979
}
80-
// [addLastIf] is only used in [EventLoop.common]. Users of [removeFirstIf]:
81-
allowBlockingCallsInside("kotlinx.coroutines.test.TestCoroutineDispatcher", "doActionsUntil")
82-
allowBlockingCallsInside("kotlinx.coroutines.test.TestCoroutineContext", "triggerActions")
8380
}
8481

8582
private fun BlockHound.Builder.allowBlockingCallsInFlow() {

0 commit comments

Comments
 (0)