This sample requires Java and Maven to run the integration test.
-
Follow the set-up instructions in the documentation.
-
Enable APIs for your project. Click here to visit Cloud Platform Console and enable the Google Cloud Spanner API.
-
Create a Cloud Spanner instance and database via the Cloud Plaform Console's Cloud Spanner section.
-
Enable application default credentials by running the command
gcloud auth application-default login.
Run the following Maven command to run integration test:
mvn test -Dspanner.test.instance=my-instance -Dspanner.test.database=my-db -Dtest=com.example.spanner.changestreams.ChangeStreamSampleIT