Class RemoteLoggingHelper (3.18.0)

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.

Inheritance

java.lang.Object > RemoteLoggingHelper

Static Methods

create()

public static RemoteLoggingHelper create()

Creates a RemoteLoggingHelper object using default project id and authentication credentials.

Returns
Type Description
RemoteLoggingHelper

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.

Parameters
Name Description
projectId String

id of the project to be used for running the tests

keyStream InputStream

input stream for a JSON key

Returns
Type Description
RemoteLoggingHelper

A RemoteLoggingHelper object for the provided options

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.

Parameter
Name Description
name String
Returns
Type Description
String

Methods

getOptions()

public LoggingOptions getOptions()

Returns a LoggingOptions object to be used for testing.

Returns
Type Description
LoggingOptions