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()
is120000
andRetrySettings.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 RemoteDatastoreHelper
create()
Creates aRemoteStorageHelper
object.static RemoteDatastoreHelper
create(String databaseId)
Creates aRemoteStorageHelper
object.void
deleteNamespace()
Deletes all entities in the namespace associated with thisRemoteDatastoreHelper
.DatastoreOptions
getOptions()
Returns aDatastoreOptions
object to be used for testing.
-
-
-
Method Detail
-
getOptions
public DatastoreOptions getOptions()
Returns aDatastoreOptions
object 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 aRemoteStorageHelper
object.
-
create
@BetaApi public static RemoteDatastoreHelper create(String databaseId)
Creates aRemoteStorageHelper
object.
-
-