ShardMainResultForwarder
public
class
ShardMainResultForwarder
extends ResultForwarder
implements
ILogSaverListener
java.lang.Object | ||
↳ | com.android.tradefed.result.ResultForwarder | |
↳ | com.android.tradefed.invoker.ShardMainResultForwarder |
用于组合分片测试调用的结果的 ResultForwarder
。只有在所有分片调用完成后,它才会向监听器报告调用完成。
此类不是线程安全的。客户端在发送测试结果时应锁定此类,以防止调用回调的顺序混乱。
摘要
公共构造函数 | |
---|---|
ShardMainResultForwarder(
|
公共方法 | |
---|---|
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,而不是先保存日志。 |
void
|
testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
|
公共构造函数
ShardMainResultForwarder
public ShardMainResultForwarder (listeners, int expectedShards)
参数 | |
---|---|
listeners |
:在所有分片都完成时要将结果转发到的 ITestInvocationListener 列表 |
expectedShards |
int :分片数量 |
公共方法
invocationEnded
public void invocationEnded (long elapsedTime)
参数 | |
---|---|
elapsedTime |
long |
invocationEnded
public void invocationEnded (long elapsedTime, IInvocationContext context)
更详细的回调,用于区分哪个分片已完成。
参数 | |
---|---|
elapsedTime |
long |
context |
IInvocationContext |
invocationFailed
public void invocationFailed (FailureDescription failure)
参数 | |
---|---|
failure |
FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
参数 | |
---|---|
cause |
Throwable |
invocationStarted
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 |