Add support for num-uniform-shards option#714
Merged
Conversation
d492b27 to
50cb090
Compare
Codecov Report
@@ Coverage Diff @@
## master #714 +/- ##
============================================
+ Coverage 78.77% 79.48% +0.71%
- Complexity 665 666 +1
============================================
Files 113 113
Lines 2676 2696 +20
Branches 380 385 +5
============================================
+ Hits 2108 2143 +35
+ Misses 322 305 -17
- Partials 246 248 +2 |
pawelpasterz
suggested changes
Apr 10, 2020
|
|
||
| devices.forEach { device -> assertDeviceSupported(device) } | ||
|
|
||
| require((numUniformShards != null && maxTestShards > 1).not()) { |
Contributor
There was a problem hiding this comment.
require throws IllegalArgumentException. Flank has dedicated FlankFatalError for such cases. We could throw this instead. Cause message will still be printed but without stack trace. Let me know what do you think.
| shardingOption = ShardingOption().apply { | ||
| if (args.numUniformShards != null) { | ||
| testTargets = testShards.flatten() | ||
| uniformSharding = UniformSharding().setNumShards(args.numUniformShards) |
Contributor
There was a problem hiding this comment.
When number of numUniformShards is bigger then number of tests flank we get error while processing results
java.lang.IllegalStateException: response.testCases must not be null
at ftl.reports.api.CreateTestExecutionDataKt.createTestExecutionData(CreateTestExecutionData.kt:34)
at ftl.reports.api.CreateTestExecutionDataKt$createTestExecutionData$1.invokeSuspend(CreateTestExecutionData.kt)
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:310)
at kotlinx.coroutines.JobSupport.tryFinalizeFinishingState(JobSupport.kt:236)
at kotlinx.coroutines.JobSupport.tryMakeCompletingSlowPath(JobSupport.kt:849)
at kotlinx.coroutines.JobSupport.tryMakeCompleting(JobSupport.kt:811)
at kotlinx.coroutines.JobSupport.makeCompletingOnce$kotlinx_coroutines_core(JobSupport.kt:787)
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.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:594)
at kotlinx.coroutines.scheduling.CoroutineScheduler.access$runSafely(CoroutineScheduler.kt:60)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:740)
In this particular case test apk had 7 tests and numUniformShards was set to 10. As result 10 shards was launched.
5038a91 to
4dd963f
Compare
4dd963f to
375a9f1
Compare
pawelpasterz
approved these changes
Apr 13, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #713
Checklist