Google is committed to advancing racial equity for Black communities. See how.
本頁面由 Cloud Translation API 翻譯而成。
Switch to English

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)

創建一個ShardMainResultForwarder

公開方法

void invocationEnded (long elapsedTime)

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而不是先保存日誌。

void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)

公共建設者

ShardMainResultForwarder

public ShardMainResultForwarder ( listeners, 
                int expectedShards)

創建一個ShardMainResultForwarder

參量
listenersITestInvocationListener的列表,用於在所有分片完成時將結果轉發到

expectedShards int :分片數

公開方法

調用結束

public void invocationEnded (long elapsedTime)

參量
elapsedTime long

調用失敗

public void invocationFailed (FailureDescription failure)

參量
failure FailureDescription

調用失敗

public void invocationFailed (Throwable cause)

參量
cause Throwable

調用開始

public void invocationStarted (IInvocationContext context)

參量
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

參量
dataName String

logFile LogFile

testLogForward

public void testLogForward (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream)

僅轉發testLog而不是先保存日誌。

參量
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

public void testLogSaved (String dataName, 
                LogDataType dataType, 
                InputStreamSource dataStream, 
                LogFile logFile)

參量
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile