Class RemoteDatastoreHelper
- java.lang.Object
-
- com.google.cloud.datastore.testing.RemoteDatastoreHelper
-
@InternalApi public class RemoteDatastoreHelper extends Object
Utility to create a remote datastore configuration for testing. Datastore options can be obtained via thegetOptions()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 usingdeleteNamespace(). Returned options also have customServiceOptions.getRetrySettings():RetrySettings.getMaxAttempts()is10,RetrySettings.getMaxRetryDelay()is30000,RetrySettings.getTotalTimeout()is120000andRetrySettings.getInitialRetryDelay()is250.HttpTransportOptions.getConnectTimeout()andHttpTransportOptions.getReadTimeout()are both both set to60000.Internal testing use only
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RemoteDatastoreHelpercreate()Creates aRemoteStorageHelperobject.static RemoteDatastoreHelpercreate(String databaseId)Creates aRemoteStorageHelperobject.voiddeleteNamespace()Deletes all entities in the namespace associated with thisRemoteDatastoreHelper.DatastoreOptionsgetOptions()Returns aDatastoreOptionsobject to be used for testing.
-
-
-
Method Detail
-
getOptions
public DatastoreOptions 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
public static RemoteDatastoreHelper create()
Creates aRemoteStorageHelperobject.
-
create
@BetaApi public static RemoteDatastoreHelper create(String databaseId)
Creates aRemoteStorageHelperobject.
-
-