to top
class

ShardMasterResultForwarder

extends ResultForwarder
java.lang.Object
   ↳ com.android.tradefed.result.ResultForwarder
     ↳ com.android.tradefed.invoker.ShardMasterResultForwarder

Class Overview

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
ShardMasterResultForwarder(List<ITestInvocationListener> listeners, int expectedShards)
Public Methods
void invocationEnded(long elapsedTime)
Reports that the invocation has terminated, whether successfully or due to some error condition.
void invocationFailed(Throwable cause)
Reports an incomplete invocation due to some error condition.
void invocationStarted(IBuildInfo buildInfo)
Reports the start of the test invocation.
[Expand]
Inherited Methods
From class com.android.tradefed.result.ResultForwarder
From class java.lang.Object
From interface com.android.tradefed.result.ITestInvocationListener
From interface com.android.ddmlib.testrunner.ITestRunListener

Public Constructors

public ShardMasterResultForwarder (List<ITestInvocationListener> listeners, int expectedShards)

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

Public Methods

public void invocationEnded (long elapsedTime)

Reports that the invocation has terminated, whether successfully or due to some error condition.

Will be automatically called by the TradeFederation framework.

Parameters
elapsedTime the elapsed time of the invocation in ms

public void invocationFailed (Throwable cause)

Reports an incomplete invocation due to some error condition.

Will be automatically called by the TradeFederation framework.

Parameters
cause the Throwable cause of the failure

public void invocationStarted (IBuildInfo buildInfo)

Reports the start of the test invocation.

Will be automatically called by the TradeFederation framework.

Parameters
buildInfo information about the build being tested