Package com.google.cloud.bigquery.testing (2.13.3-SNAPSHOT)

A testing helper for Google BigQuery.

A simple usage example:

Before the test:


 RemoteBigQueryHelper bigqueryHelper = RemoteBigQueryHelper.create();
 BigQuery bigquery = bigqueryHelper.getOptions().getService();
 String dataset = RemoteBigQueryHelper.generateDatasetName();
 bigquery.create(DatasetInfo.newBuilder(dataset).build());
 

After the test:


 RemoteBigQueryHelper.forceDelete(bigquery, DATASET);
 

See Also: Google Cloud Java tools for testing

Classes

RemoteBigQueryHelper

Utility to create a remote BigQuery configuration for testing. BigQuery options can be obtained via the #getOptions() method. Returned options have custom BigQueryOptions#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 set to 60000.

Exceptions

RemoteBigQueryHelper.BigQueryHelperException