ShardMainResultForwarder
public class ShardMainResultForwarder
extends ResultForwarder
implements ILogSaverListener
java.lang.Object | ||
↳ | com.android.tradefed.result.ResultForwarder | |
↳ | com.android.tradefed.invoker.ShardMainResultForwarder |
合併分片測試呼叫結果的ResultForwarder
。它僅在所有分片呼叫完成後才向偵聽器報告呼叫完成情況。
該類別不是線程安全的。預計客戶端在發送測試結果時會鎖定此類,以防止亂序呼叫呼叫回調。
概括
公共構造函數 | |
---|---|
ShardMainResultForwarder ( listeners, int expectedShards) ShardMainResultForwarder ( listeners, int expectedShards) 建立一個 |
公共方法 | |
---|---|
void | invocationEnded (long elapsedTime) |
void | invocationEnded (long elapsedTime, IInvocationContext context) 更詳細的回調以區分哪個分片已完成。 |
void | invocationFailed (FailureDescription failure) |
void | invocationFailed (Throwable cause) |
void | invocationStarted (IInvocationContext context) |
void | logAssociation (String dataName, LogFile logFile) |
void | testLogForward (String dataName, LogDataType dataType, InputStreamSource dataStream) 只轉發testLog,而不是先儲存log。 |
void | testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
|
公共構造函數
ShardMainResultForwarder
public ShardMainResultForwarder (listeners, int expectedShards)
建立一個ShardMainResultForwarder
。
參數 | |
---|---|
listeners | ITestInvocationListener 列表 |
expectedShards | int : 分片數量 |
公共方法
呼叫結束
public void invocationEnded (long elapsedTime)
參數 | |
---|---|
elapsedTime | long |
呼叫結束
public void invocationEnded (long elapsedTime, IInvocationContext context)
更詳細的回調以區分哪個分片已完成。
參數 | |
---|---|
elapsedTime | long |
context | IInvocationContext |
呼叫失敗
public void invocationFailed (FailureDescription failure)
參數 | |
---|---|
failure | FailureDescription |
呼叫失敗
public void invocationFailed (Throwable cause)
參數 | |
---|---|
cause | Throwable |
調用開始
public void invocationStarted (IInvocationContext context)
參數 | |
---|---|
context | IInvocationContext |
日誌關聯
public void logAssociation (String dataName, LogFile logFile)
參數 | |
---|---|
dataName | String |
logFile | LogFile |
測試日誌轉發
public void testLogForward (String dataName, LogDataType dataType, InputStreamSource dataStream)
只轉發testLog,而不是先儲存log。
參數 | |
---|---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
測試日誌已儲存
public void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
參數 | |
---|---|
dataName | String |
dataType | LogDataType |
dataStream | InputStreamSource |
logFile | LogFile |