ShardMainResultForwarder
public
class
ShardMainResultForwarder
extends ResultForwarder
implements
ILogSaverListener
| java.lang.Object | ||
| ↳ | com.android.tradefed.result.ResultForwarder | |
| ↳ | com.android.tradefed.invoker.ShardMainResultForwarder | |
ResultForwarder yang menggabungkan hasil pemanggilan pengujian yang di-sharding. Metode ini hanya
melaporkan penyelesaian pemanggilan ke pemroses setelah semua pemanggilan yang di-shard selesai.
Class ini tidak aman untuk thread. Klien diharapkan akan mengunci class ini saat mengirim hasil pengujian, untuk mencegah callback pemanggilan dipanggil secara tidak berurutan.
Ringkasan
Konstruktor publik | |
|---|---|
ShardMainResultForwarder(
Buat |
|
Metode publik | |
|---|---|
void
|
invocationEnded(long elapsedTime)
|
void
|
invocationEnded(long elapsedTime, IInvocationContext context)
Callback yang lebih mendetail untuk membedakan shard mana yang selesai. |
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)
Hanya teruskan testLog, bukan menyimpan log terlebih dahulu. |
void
|
testLogSaved(String dataName, LogDataType dataType, InputStreamSource dataStream, LogFile logFile)
|
Konstruktor publik
ShardMainResultForwarder
public ShardMainResultForwarder (listeners, int expectedShards)
Buat ShardMainResultForwarder.
| Parameter | |
|---|---|
listeners |
: daftar ITestInvocationListener untuk meneruskan hasil saat semua
shard selesai |
expectedShards |
int: jumlah shard
|
Metode publik
invocationEnded
public void invocationEnded (long elapsedTime)
| Parameter | |
|---|---|
elapsedTime |
long |
invocationEnded
public void invocationEnded (long elapsedTime,
IInvocationContext context)Callback yang lebih mendetail untuk membedakan shard mana yang selesai.
| Parameter | |
|---|---|
elapsedTime |
long |
context |
IInvocationContext |
invocationFailed
public void invocationFailed (FailureDescription failure)
| Parameter | |
|---|---|
failure |
FailureDescription |
invocationFailed
public void invocationFailed (Throwable cause)
| Parameter | |
|---|---|
cause |
Throwable |
invocationStarted
public void invocationStarted (IInvocationContext context)
| Parameter | |
|---|---|
context |
IInvocationContext |
logAssociation
public void logAssociation (String dataName,
LogFile logFile)
| Parameter | |
|---|---|
dataName |
String |
logFile |
LogFile |
testLogForward
public void testLogForward (String dataName,
LogDataType dataType,
InputStreamSource dataStream)Hanya teruskan testLog, bukan menyimpan log terlebih dahulu.
| Parameter | |
|---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
testLogSaved
public void testLogSaved (String dataName,
LogDataType dataType,
InputStreamSource dataStream,
LogFile logFile)
| Parameter | |
|---|---|
dataName |
String |
dataType |
LogDataType |
dataStream |
InputStreamSource |
logFile |
LogFile |