spanner: fix DBs conflict in different tests
@@ -37,7 +37,9 @@ func TestSample(t *testing.T) {
if !strings.HasPrefix(instance, "projects/") {
t.Fatal("Spanner instance ref must be in the form of 'projects/PROJECT_ID/instances/INSTANCE_ID'")
}
- dbName := fmt.Sprintf("%s/databases/test-%s", instance, tc.ProjectID)
+ // "test-l-" is different from the database name in snippet_test.go because
+ // this prevents from running against the same database.
+ dbName := fmt.Sprintf("%s/databases/test-l-%s", instance, tc.ProjectID)
ctx := context.Background()
adminClient, dataClient := createClients(ctx, dbName)
