Skip to content

Is is impossible to use CoroutinesTimeoutExtension with Java 8 #4278

@osipxd

Description

@osipxd

Describe the bug

CoroutinesTimeoutExtension uses some "new" APIs:

  • Optional.or { ... } function which was added in Java 9
  • Optional.isEmpty() function which was added in Java 11

So effectively the minimal supported JVM version is 11, which is specified in jdk_toolchain_version, while jvmTarget is set to JvmTarget.JVM_1_8.

Provide a Reproducer

  1. Set the project JVM toolchain to 8
    kotlin {
        jvmToolchain(8)
    }
  2. Add @CoroutinesTimeout to any test
  3. Compile

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions