ShardHelper

public class ShardHelper
extends Object implements IShardHelper

java.lang.Object
   ↳ com.android.tradefed.invoker.shard.ShardHelper


處理建立分片並排定調用時間的輔助類別。

摘要

常數

String LAST_SHARD_DETECTOR

String SHARED_TEST_INFORMATION

公用建構函式

ShardHelper()

公用方法

boolean shardConfig(IConfiguration config, TestInformation testInfo, IRescheduler rescheduler, ITestLogger logger)

嘗試將設定分片為子設定,以便重新排程,在多個資源上平行執行。

受保護的方法

IGlobalConfiguration getGlobalConfiguration()

傳回目前的全域設定。

void validateOptions(TestInformation testInfo, IConfiguration config)

在設定上執行 IConfiguration.validateOptions()

常數

LAST_SHARD_DETECTOR

public static final String LAST_SHARD_DETECTOR

常數值: "last_shard_detector"

SHARED_TEST_INFORMATION

public static final String SHARED_TEST_INFORMATION

常數值: "shared_test_information"

公用建構函式

ShardHelper

public ShardHelper ()

公用方法

shardConfig

public boolean shardConfig (IConfiguration config, 
                TestInformation testInfo, 
                IRescheduler rescheduler, 
                ITestLogger logger)

嘗試將設定分片為子設定,以便重新排程,在多個資源上平行執行。

成功執行分片動作會使目前的設定為空,且不應繼續叫用。

參數
config IConfiguration:目前的 IConfiguration

testInfo TestInformationTestInformation 舉辦測驗的機構。

rescheduler IReschedulerIRescheduler

logger ITestLogger

傳回
boolean 如果測試已分片,則為 true。否則傳回 false

另請參閱:

受保護的方法

getGlobalConfiguration

protected IGlobalConfiguration getGlobalConfiguration ()

傳回目前的全域設定。

傳回
IGlobalConfiguration

validateOptions

protected void validateOptions (TestInformation testInfo, 
                IConfiguration config)

在設定上執行 IConfiguration.validateOptions()

參數
testInfo TestInformation

config IConfiguration