IShardableTest
public
interface
IShardableTest
implements
IRemoteTest
| com.android.tradefed.testtype.IShardableTest |
A IRemoteTest that can be split into separately executable sub-tests. The splitting into
sub-tests is expected to be deterministic and each sub-test should be independent in order to
allow for execution of different shards on different hosts.
Summary
Public methods | |
|---|---|
default
Collection<IRemoteTest>
|
split(Integer shardCountHint, TestInformation testInfo)
Alternative version of |
default
Collection<IRemoteTest>
|
split()
Shard the test into separately runnable chunks. |
default
Collection<IRemoteTest>
|
split(int shardCountHint)
Alternative version of |
Public methods
split
public Collection<IRemoteTest> split (Integer shardCountHint, TestInformation testInfo)
Alternative version of split(int) which also provides a TestInformation
which contains early info from the parent creating the shards. It is useful if things like
device or build information need to be accessed during sharding.
| Parameters | |
|---|---|
shardCountHint |
Integer: the attempted shard count. |
testInfo |
TestInformation: The parent TestInformation |
| Returns | |
|---|---|
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |
split
public Collection<IRemoteTest> split ()
Shard the test into separately runnable chunks.
This must be deterministic and always return the same list of IRemoteTests for the
same input.
This will be called before test execution, so injected dependencies (such as the ITestDevice for IDeviceTests) may be null.
| Returns | |
|---|---|
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |
split
public Collection<IRemoteTest> split (int shardCountHint)
Alternative version of split() which also provides the shardCount that is attempted
to be run. This is useful for some test runner that cannot arbitrarily decide sometimes.
| Parameters | |
|---|---|
shardCountHint |
int: the attempted shard count. |
| Returns | |
|---|---|
Collection<IRemoteTest> |
a collection of subtests to be executed separately or null if test is
not currently shardable |