ShardMainResultForwarder
public
class
ShardMainResultForwarder
extends ResultForwarder
implements
ILogSaverListener
java.lang.Object | ||
↳ | com.android.tradefed.result.ResultForwarder | |
↳ | com.android.tradefed.invoker.ShardMainResultForwarder |
ResultForwarder
kết hợp kết quả của các lệnh gọi kiểm thử được phân đoạn. Phương thức này chỉ báo cáo việc hoàn tất lệnh gọi cho trình nghe sau khi tất cả lệnh gọi được phân đoạn hoàn tất.
Lớp này không an toàn đối với luồng. Dự kiến, ứng dụng sẽ khoá lớp này khi gửi kết quả kiểm thử để ngăn việc gọi lại lệnh gọi không theo thứ tự.
Tóm tắt
Hàm khởi tạo công khai | |
---|---|
ShardMainResultForwarder(
|
Phương thức công khai | |
---|---|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationEnded(long elapsedTime, IInvocationContext context)
Lệnh gọi lại chi tiết hơn để phân biệt mảnh nào đã hoàn tất. |
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)
Chỉ chuyển tiếp testLog thay vì lưu nhật ký trước. |
void
|
testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
|
Hàm khởi tạo công khai
ShardMainResultForwarder
public ShardMainResultForwarder (listeners, int expectedShards)
Tham số | |
---|---|
listeners |
: danh sách ITestInvocationListener để chuyển tiếp kết quả khi tất cả các phân mảnh đã hoàn tất |
expectedShards |
int : số lượng phân mảnh
|
Phương thức công khai
invocationEnded
public void invocationEnded (long elapsedTime)
Tham số | |
---|---|
elapsedTime |
long |
invocationEnded
public void invocationEnded (long elapsedTime, IInvocationContext context)
Lệnh gọi lại chi tiết hơn để phân biệt mảnh nào đã hoàn tất.
Tham số | |
---|---|
elapsedTime |
long |
context |
IInvocationContext |
invocationFailed
public void invocationFailed (FailureDescription failure)
Tham số | |
---|---|
failure |
FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
Tham số | |
---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
Tham số | |
---|---|
context |
IInvocationContext |
logAssociation
public void logAssociation (String dataName, LogFile logFile)
Tham số | |
---|---|
dataName |
String |
logFile |
LogFile |
testLogForward
public void testLogForward (String dataName, LogDataType dataType, InputStreamSource dataStream)
Chỉ chuyển tiếp testLog thay vì lưu nhật ký trước.
Tham số | |
---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
testLogSaved
public void testLogSaved (String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
Tham số | |
---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
logFile |
LogFile |