Stay organized with collections
Save and categorize content based on your preferences.
StrictShardHelper
public
class
StrictShardHelper
extends ShardHelper
Known direct subclasses
DynamicShardHelper |
Sharding strategy to allow work remote work queueing between multiple TF instances
|
|
Sharding strategy to create strict shards that do not report together,
Summary
Public constructors
StrictShardHelper
public StrictShardHelper ()
Public methods
public boolean shardConfig (IConfiguration config,
TestInformation testInfo,
IRescheduler rescheduler,
ITestLogger logger)
Attempt to shard the configuration into sub-configurations, to be re-scheduled to run on
multiple resources in parallel.
A successful shard action renders the current config empty, and invocation should not
proceed.
Returns |
boolean |
true if test was sharded. Otherwise return false |
Protected methods
splitTests
protected splitTests ( fullList,
int shardCount,
boolean useEvenModuleSharding)
Split the list of tests to run however the implementation see fit. Sharding needs to be
consistent. It is acceptable to return an empty list if no tests can be run in the shard.
Implement this in order to provide a test suite specific sharding. The default
implementation attempts to balance the number of IRemoteTest per shards as much as possible
as a first step, then use a minor criteria or run-hint to adjust the lists a bit more.
Parameters |
fullList |
: the initial full list of IRemoteTest containing all the tests that
need to run. |
shardCount |
int : the total number of shard that need to run. |
useEvenModuleSharding |
boolean : whether to use a strategy that evenly distributes number of
modules across shards |
Returns |
|
a list of list IRemoteTest s that have been assigned to each shard. The list
size will be the shardCount. |
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-08-13 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-08-13 UTC."],[],[]]