Skip to content

Broken testTargetsForShard #282

@inehemiasm

Description

@inehemiasm

Hi, i am trying to distribute a set of tests A on one shard and set of testsB on a separate shard. I assume that't the solution would be to configure something like this:

testTargetsForShard.set( 
  project.provider { 
    listOf( 
      "class com.example.testsA",
      "class com.example.testsB"
    )
  }
) 

when i execute ./gradlew printYml i noticed that it's set properly

test-targets-for-shard: 
   - class com.example.testsA"
   - class com.example.testsB"

However, when i execute ./gradlew runFlank
I get the following error:

RunTests
java.nio.file.NoSuchFileException: /Users/username/Documents/ProjectPath/My-Project/app/build/fladle/results/2021-10-28_04-46-04.721060_dpnG/android_shards.json

        at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)
        at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
Total run duration: 0m  3s
        at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
        - Preparation: 0m 2s
        at java.base/java.nio.file.Files.newByteChannel(Files.java:375)
        at java.base/java.nio.file.Files.newByteChannel(Files.java:426)
        at java.base/java.nio.file.Files.readAllBytes(Files.java:3272)
        at ftl.run.platform.RunAndroidTestsKt.dumpShards(RunAndroidTests.kt:83)
        at ftl.run.platform.RunAndroidTestsKt.access$dumpShards(RunAndroidTests.kt:1)
        at ftl.run.platform.RunAndroidTestsKt$runAndroidTests$2.invokeSuspend(RunAndroidTests.kt:46)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
        at kotlinx.coroutines.internal.ScopeCoroutine.afterResume(Scopes.kt:33)
        at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:102)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
        at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:274)
        at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:85)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:59)
        at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
        at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:38)
        at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
        at ftl.presentation.RunStateKt.runBlockingWithObservingRunState(RunState.kt:17)
        at ftl.domain.RunTestAndroidKt.invoke(RunTestAndroid.kt:63)
        at ftl.presentation.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:58)
        at picocli.CommandLine.executeUserObject(CommandLine.java:1939)
        at picocli.CommandLine.access$1300(CommandLine.java:145)
        at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
        at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
        at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
        at picocli.CommandLine.execute(CommandLine.java:2078)
        at ftl.Main$main$1.invoke(Main.kt:12)
        at ftl.Main$main$1.invoke(Main.kt:10)
        at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:28)
        at ftl.run.exception.ExceptionHandlerKt.withGlobalExceptionHandling(ExceptionHandler.kt:17)
        at ftl.Main.main(Main.kt:10)

> Task :app:execFlank FAILED

It seems that it tries to grab android_shards.json file that was never generated. Unless the user have to manually provide it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions