Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid Test Filter should exit #647

Closed
RainNapper opened this issue Mar 3, 2020 · 2 comments
Closed

Invalid Test Filter should exit #647

RainNapper opened this issue Mar 3, 2020 · 2 comments
Assignees

Comments

@RainNapper
Copy link
Contributor

RainNapper commented Mar 3, 2020

When passing in a test filter that is improperly formed, Flank will throw an exception but will not terminate. When flank is run in CI, this causes unnecessary timeouts while the scripts are waiting for the command to finish.

Example error

	at ftl.filter.TestFilters.parseSingleFilter(TestFilters.kt:100)
	at ftl.filter.TestFilters.access$parseSingleFilter(TestFilters.kt:31)
	at ftl.filter.TestFilters$fromTestTargets$parsedFilters$2.invoke(TestFilters.kt:85)
	at ftl.filter.TestFilters$fromTestTargets$parsedFilters$2.invoke(TestFilters.kt:31)
	at kotlin.sequences.TransformingSequence$iterator$1.next(Sequences.kt:172)
	at kotlin.sequences.SequencesKt___SequencesKt.toCollection(_Sequences.kt:702)
	at kotlin.sequences.SequencesKt___SequencesKt.toMutableList(_Sequences.kt:732)
	at kotlin.sequences.SequencesKt___SequencesKt.toList(_Sequences.kt:723)
	at ftl.filter.TestFilters.fromTestTargets(TestFilters.kt:86)
	at ftl.args.AndroidTestShard.getTestMethods(AndroidTestShard.kt:32)
	at ftl.args.AndroidTestShard.getTestShardChunks(AndroidTestShard.kt:25)
	at ftl.run.AndroidTestRunner$runTests$2.invokeSuspend(AndroidTestRunner.kt:38)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
	at kotlinx.coroutines.ResumeModeKt.resumeUninterceptedMode(ResumeMode.kt:45)
	at kotlinx.coroutines.internal.ScopeCoroutine.afterCompletionInternal(Scopes.kt:32)
	at kotlinx.coroutines.JobSupport.completeStateFinalization(JobSupport.kt:311)
	at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:237)
	at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:851)
	at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:813)
	at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:789)
	at kotlinx.coroutines.AbstractCoroutine.resumeWith(AbstractCoroutine.kt:111)
	at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:46)
	at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
	at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.kt:116)
	at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
	at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at ftl.cli.firebase.test.android.AndroidRunCommand.run(AndroidRunCommand.kt:49)
	at picocli.CommandLine.executeUserObject(CommandLine.java:1687)
	at picocli.CommandLine.access$900(CommandLine.java:146)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2059)
	at picocli.CommandLine$RunLast.handle(CommandLine.java:2026)
	at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1893)
	at picocli.CommandLine.execute(CommandLine.java:1822)
	at ftl.Main$Companion.main(Main.kt:41)
	at ftl.Main.main(Main.kt)```
@pawelpasterz pawelpasterz self-assigned this Mar 3, 2020
@pawelpasterz
Copy link
Contributor

Closing since #649 is more general and will solve this issue as well.

@RainNapper
Copy link
Contributor Author

Oops, I had two tabs open, and thought I didn't submit when I did. Sorry about the duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants