Class RemoteDatastoreHelper
java.lang.Object
com.google.cloud.datastore.testing.RemoteDatastoreHelper
Utility to create a remote datastore configuration for testing. Datastore options can be obtained
via the
getOptions() method. Returned options use a randomly generated namespace (DatastoreOptions.getNamespace()) that can be used to run the tests. Once the tests are run, all
entities in the namespace can be deleted using deleteNamespace(). Returned options also
have custom ServiceOptions.getRetrySettings(): RetrySettings.getMaxAttempts()
is 10, RetrySettings.getMaxRetryDelay() is 30000, RetrySettings.getTotalTimeout() is 120000 and RetrySettings.getInitialRetryDelay() is 250. HttpTransportOptions.getConnectTimeout() and HttpTransportOptions.getReadTimeout() are
both both set to 60000.
Internal testing use only
-
Method Summary
Modifier and TypeMethodDescriptionstatic RemoteDatastoreHelpercreate()Creates aRemoteStorageHelperobject.static RemoteDatastoreHelperCreates aRemoteStorageHelperobject.voidDeletes all entities in the namespace associated with thisRemoteDatastoreHelper.Returns aDatastoreOptionsobject to be used for testing.
-
Method Details
-
getOptions
Returns aDatastoreOptionsobject to be used for testing. The options are associated to a randomly generated namespace. -
deleteNamespace
public void deleteNamespace()Deletes all entities in the namespace associated with thisRemoteDatastoreHelper. -
create
Creates aRemoteStorageHelperobject. -
create
Creates aRemoteStorageHelperobject.
-