@@ -11,7 +11,7 @@ internal object ParallelTests {
1111 *
1212 * This assumes that the environment variable `MAX_TEST_PARALLEL_FORKS` is set to the number of `maxParallelForks`.
1313 */
14- internal fun partitioned (): PartitionedTest {
14+ internal fun isPartitioned (): PartitionedTest {
1515 val maxTestPartitions = System .getenv(" MAX_TEST_PARALLEL_FORKS" )?.toInt()
1616 return if (maxTestPartitions != null && maxTestPartitions > 1 ) {
1717 val testWorkerId = System .getProperty(" org.gradle.test.worker" , " 0" ).toInt()
@@ -29,8 +29,8 @@ internal sealed interface PartitionedTest {
2929}
3030
3131/* *
32- * Applies the `update` function to the given `T`, if the tests are running in parallel
33- * (with Gradle's `maxParallelForks`). The `update` function is also passed the partition ID.
32+ * Applies the `update` lambda to the given `T`, if the tests are running in parallel
33+ * (with Gradle's `maxParallelForks`).
3434 *
3535 * This can be used for updating configurations for the purpose of providing isolation between
3636 * tests running across different parallel processes, such as appending the partition ID to the database name,
@@ -39,7 +39,7 @@ internal sealed interface PartitionedTest {
3939 * This assumes that the environment variable `MAX_TEST_PARALLEL_FORKS` is set to the number of `maxParallelForks`.
4040 */
4141fun <T > T.updateForParallelTests (update : (T , Int ) -> T ): T {
42- return when (val partitionedTest = ParallelTests .partitioned ()) {
42+ return when (val partitionedTest = ParallelTests .isPartitioned ()) {
4343 is PartitionedTest .Partitioned -> {
4444 update(this , partitionedTest.partitionId)
4545 }
0 commit comments