use of com.google.cloud.spanner.connection.ITAbstractSpannerTest.ITConnection in project java-spanner by googleapis.
the class AbstractMockServerTest method createConnection.
ITConnection createConnection(List<StatementExecutionInterceptor> interceptors, List<TransactionRetryListener> transactionRetryListeners) {
ConnectionOptions.Builder builder = ConnectionOptions.newBuilder().setUri(getBaseUrl()).setStatementExecutionInterceptors(interceptors);
ConnectionOptions options = builder.build();
ITConnection connection = createITConnection(options);
for (TransactionRetryListener listener : transactionRetryListeners) {
connection.addTransactionRetryListener(listener);
}
return connection;
}
Aggregations