public class RemoteLoggingHelper
Utility to create a remote logging configuration for testing. Logging options can be obtained via
the #getOptions() method. Returned options have custom LoggingOptions#getRetrySettings(): RetrySettings#getMaxRetryDelay() is 30000
,
RetrySettings#getTotalTimeout() is 120000
and RetrySettings#getInitialRetryDelay() is 250
.
Methods
create()
public static RemoteLoggingHelper create()
Creates a RemoteLoggingHelper
object using default project id and authentication
credentials.
Type | Description |
RemoteLoggingHelper |
Type | Description |
RemoteLoggingHelper.LoggingHelperException |
create(String projectId, InputStream keyStream)
public static RemoteLoggingHelper create(String projectId, InputStream keyStream)
Creates a RemoteLoggingHelper
object for the given project id and JSON key input
stream.
Name | Description |
projectId | String id of the project to be used for running the tests |
keyStream | InputStream input stream for a JSON key |
Type | Description |
RemoteLoggingHelper | A |
Type | Description |
RemoteLoggingHelper.LoggingHelperException | if |
formatForTest(String name)
public static String formatForTest(String name)
Formats a resource name for testing purpose. This method appends a random UUID to the provided name.
Name | Description |
name | String |
Type | Description |
String |
getOptions()
public LoggingOptions getOptions()
Returns a LoggingOptions object to be used for testing.
Type | Description |
LoggingOptions |