Google is committed to advancing racial equity for Black communities. See how.

ShardMainResultForwarder

public class ShardMainResultForwarder
extends ResultForwarder implements ILogSaverListener

java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.invoker.ShardMainResultForwarder


A ResultForwarder that combines the results of a sharded test invocations. It only reports completion of the invocation to the listeners once all sharded invocations are complete.

This class is not thread safe. It is expected that clients will lock on this class when sending test results, to prevent invocation callbacks from being called out of order.

Summary

Public constructors

ShardMainResultForwarder( listeners, int expectedShards)

Create a ShardMainResultForwarder.

Public methods

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)

Only forward the testLog instead of saving the log first.

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

Public constructors

ShardMainResultForwarder

public ShardMainResultForwarder ( listeners, 
                int expectedShards)

Create a ShardMainResultForwarder.

Parameters
listeners : the list of ITestInvocationListener to forward results to when all shards are completed

expectedShards int: the number of shards

Public methods

invocationEnded

public void invocationEnded (long elapsedTime)

Parameters
elapsedTime long

invocationFailed

public void invocationFailed (FailureDescription failure)

Parameters
failure FailureDescription

invocationFailed

public void invocationFailed (Throwable cause)

Parameters
cause Throwable

invocationStarted

public void invocationStarted (IInvocationContext context)

Parameters
context IInvocationContext

logAssociation

public void logAssociation (String dataName, 
                LogFile logFile)

Parameters
dataName String

logFile LogFile

testLogForward

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

Only forward the testLog instead of saving the log first.

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

testLogSaved

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

Parameters
dataName String

dataType LogDataType

dataStream InputStreamSource

logFile LogFile